-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: [M3-9016] - Convert DomainRecords.tsx
to functional component
#11447
refactor: [M3-9016] - Convert DomainRecords.tsx
to functional component
#11447
Conversation
e3e2f16
to
9d26ed5
Compare
62cf7b0
to
762f2ce
Compare
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecords.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality looked good for creating, modifying, and deleting domain records.
I left some feedback that is more minor and/or stylistic.
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecordsUtils.ts
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecords.tsx
Show resolved
Hide resolved
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecordsUtils.ts
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecordDrawer.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecords.styles.ts
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecords.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecords.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Domains/DomainDetail/DomainRecords/generateTypes.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! 🙌
Approving pending Mariah's comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking this on! Left code suggestion to improve the overall code quality - converting DomainRecordDrawer
should also be a requirement unless you are planning to do it as a follow up (I do think it falls within the scope of this PR)
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecordDrawer.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecords.tsx
Show resolved
Hide resolved
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecords.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecords.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecords.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecords.tsx
Show resolved
Hide resolved
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecordTable.tsx
Show resolved
Hide resolved
10cd020
to
11eb028
Compare
DomainRecords.tsx
to functional component
packages/manager/src/features/Domains/DomainDetail/DomainRecords/DomainRecords.tsx
Show resolved
Hide resolved
…functional component
f5a5524
to
8e9b420
Compare
Coverage Report: ✅ |
Cloud Manager UI test results🎉 474 passing tests on test run #19 ↗︎
|
Cloud Manager E2E Run #7069
Run Properties:
|
Project |
Cloud Manager E2E
|
Branch Review |
develop
|
Run status |
Passed #7069
|
Run duration | 27m 33s |
Commit |
584aab4f4f: refactor: [M3-9016] - Convert `DomainRecords.tsx` to functional component (#1144...
|
Committer | Purvesh Makode |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
1
|
Pending |
2
|
Skipped |
0
|
Passing |
474
|
View all changes introduced in this branch ↗︎ |
…nent (linode#11447) * Initial commit * More refactoring... * Consolidate Pagination Footer * Few fixes... * Fix NS record domain render * Added changeset: Refactor DomainRecords and convert DomainRecords to functional component * Update changeset * Fix DomainRecordTable paginatedData type * Refactor generateTypes * Memoize generateTypes * Utility rename for clarity * Update tablerow key * Change to more descriptive var names * Fix typo * Use scrollErrorIntoViewV2 * Fix linting * Refactor to remove some ramda dependencies and avoid `any` types
* change: [UIE-8228] - Database Resize: disable same size plan (#11481) * change: [UIE-8228] - Database Resize: disable same size plan * Added changeset: Database Resize: Disable plans when the usable storage equals the used storage of the database cluster * test: Fix DateTimeRangePicker unit test failure (#11502) ## Description 📝 This attempts to fix a unit test failure in `DateTimeRangePicker.test.ts` when the test is run in an environment whose system locale is not set to central time (UTC-06:00). Also does some clean up related to the way that the system time is mocked. ## Changes 🔄 - Fix test failure in DateTimeRangePicker unit tests - Clean up ## How to test 🧪 ```bash yarn test DateTimeRangePicker.test ``` * fix: Preferences type_to_confirm being undefined no longer causes button to be disabled (#11500) ## Description 📝 There is an edge case where `preferences?.type_to_confirm` is `undefined` when the user has not yet set a preference as seen in `/profile/settings?preferenceEditor=true`. ## Changes 🔄 - Ensure that `preferences?.type_to_confirm` resolves to a boolean value (default true) ## How to test 🧪 ### Prerequisites - Removed `type_to_confirm` preference from /profile/settings?preferenceEditor=true ### Reproduction steps - Observe the disabled button for linode deletion dialogs and others ### Verification steps #### Step 1 - Removed `type_to_confirm` preference from /profile/settings?preferenceEditor=true - Ensure type-to-confirm is enabled by default - Check linode: delete, resize, rebuild - Check domain: delete - Check close account still works as intended #### Step 2 - Disable type-to-confirm - Check linode: delete, resize, rebuild - Check domain: delete - Check close account still works as intended --------- Co-authored-by: Jaalah Ramos <jaalah.ramos@gmail.com> Co-authored-by: Hana Xu <hxu@akamai.com> * refactor: [M3-8246, M3-8252] - Replace Ramda's `splitAt` with custom utility (#11483) * Add custom utility and remove `splitAt` ramda instances * Cleanup with method overloading * Fix comments * Added changeset: Replace ramda's `splitAt` with custom utility * Fix comment * test: [M3-8313] - Move OBJ Multicluster Cypress tests to `ObjectStorageMulticluster` (#11484) * Move OBJ multicluster tests from `objectStorage` to `objectStorageMulticluster` dir * Added changeset: Improve organization of Object Storage and Object Storage Multicluster tests * feat: [UIE-8134] - add new entities component (#11429) * refactor: [M3-9016] - Convert `DomainRecords.tsx` to functional component (#11447) * Initial commit * More refactoring... * Consolidate Pagination Footer * Few fixes... * Fix NS record domain render * Added changeset: Refactor DomainRecords and convert DomainRecords to functional component * Update changeset * Fix DomainRecordTable paginatedData type * Refactor generateTypes * Memoize generateTypes * Utility rename for clarity * Update tablerow key * Change to more descriptive var names * Fix typo * Use scrollErrorIntoViewV2 * Fix linting * Refactor to remove some ramda dependencies and avoid `any` types * refactor: [M3-9031] - Replace one-off hardcoded color values with color tokens pt5 (#11488) * Replace hardcoded color values with color tokens pt5 * Added changeset: Replace one-off hardcoded color values with color tokens pt5 * Revert back the color replacement of `#10` * test: [M3-9066] - Remove Cypress deprecated helper functions (#11501) * Remove dedrecated Cypress helper functions * Added changeset: Remove cypress deprecated helper.ts functions * change: [M3-9067] - Improve Backups Banner Styles and Refactor Notice Component (#11480) * initial improvements and notice fixes * clean up more * make jsx more readable * fix placement group unit test test id * fix cypress tests * add changesets * tighten spacing * use variant based on UX feedback * remove the `marketing` notice variant * changeset * final fixes and tweaks * clean up a bit more --------- Co-authored-by: Banks Nussman <banks@nussman.us> * upcoming: [DI-22132] - Added criteria section in alert details page for ACLP Alerting (#11477) * upcoming: [DI-22596] - Criteria changes * upcoming: [DI-22596] - Criteria changes * upcoming: [DI-22596] - Criteria changes * upcoming: [DI-22596] - Alert detail chips * upcoming: [DI-22596] - CSS changes * upcoming: [DI-22596] - Code refactoring * upcoming: [DI-22596] - Add types * upcoming: [DI-22132] - Code refactoring * upcoming: [DI-22132] - Add changeset * upcoming: [DI-22132] - Add factories and constants * upcoming: [DI-22132] - Use factories in mock * upcoming: [DI-22132] - Refactor alert criteria component * upcoming: [DI-22132] - Code refactoring, util update and constants update * upcoming: [DI-22132] - Code refactoring * upcoming: [DI-22132] - UT updates and code clean up * upcoming: [DI-22132] - Code updates * upcoming: [DI-22132] - Comment update and label update * upcoming: [DI-22132] - Code refactoring and updates * upcoming: [DI-22132] - Reusable typography * upcoming: [DI-22132] - Use common typography * upcoming: [DI-22132] - Rename common typography * upcoming: [DI-22132] - Add logical comments * upcoming: [DI-22132] - Add spacing constant * upcoming: [DI-22132] - Code refactoring * upcoming: [DI-22132] - Code refactoring * upcoming: [DI-22132] - CSS fixes * upcoming: [DI-22132] - Remove pick random * upcoming: [DI-22132] - Code merge error fixes * upcoming: [DI-22132] - Merge imports into one * upcoming: [DI-22132] - Color changes for PR * upcoming: [DI-22132] - ES lint issue fix * upcoming: [DI-22132] - Height changes to px value * upcoming: [DI-22132] - Constants and text update --------- Co-authored-by: vmangalr <vmangalr@akamai.com> * change: Update understanding bucket rate limits for OBJ Gen2 (#11513) * Update understanding bucket rate limits link * Added changeset: Tech doc link for Bucket Rate Limits have changed * Update link --------- Co-authored-by: Jaalah Ramos <jaalah.ramos@gmail.com> * upcoming: [DI-22714] - Metrics and JWE Token api request update in CloudPulse (#11506) * upcoming: [DI-22714] - metrics call request update * upcoming: [DI-22714] - update factory * upcoming: [DI-22714] - jwe token call payload update * upcoming: [DI-22714] - small enhancement * upcoming: [DI-22714] - Add changeset * refactor: [M3-8252] - Remove ramda from `CreateDomain.tsx` (#11505) * Remove ramda from `CreateDomain` * Add changeset * fix: [M3-9009] - Fix spacing for LKE cluster tags (#11507) * Fix spacing for cluster tags * Added changeset: Spacing for LKE cluster tags at desktop screen sizes * refactor: [M3-9053] - Reroute Longview (#11490) * Initial commit * useTabs hooks improvements * improve hook * default redirect * Update hook with ref * tablist! * cleanup & tests * moar cleanup * feedback @mjac0bs * Post rebase fix * change: [M3-8956] - Update `tsconfig.json`s to use `bundler` moduleResolution (#11487) * update tsconfigs * add changesets * fix cypress typecheck --------- Co-authored-by: Banks Nussman <banks@nussman.us> * upcoming: [M3-9084] - Handle edge cases with UDP NodeBalancer (#11515) * handle edge cases with UDP * add changesets * add one more changeset --------- Co-authored-by: Banks Nussman <banks@nussman.us> * test: [M3-8692] - Component tests for PasswordInput (#11508) * initial commit * password input tests * Added changeset: Add component tests for PasswordInput * couple other tests * test updates + address feedback @hana-akamai * deps: [M3-9082, M3-9083] - Dependabot Fixes (#11510) * deps: [M3-9082] - Dependabot Fixes * Added changeset: Dependabot security fixes --------- Co-authored-by: Jaalah Ramos <jaalah.ramos@gmail.com> * fix: [M3-9073] - Fix duplicate specs in Cypress Slack / GH notifications (#11489) * Avoid duplicating specs in run command output, reduce Slack failure list to 4 * Add changeset * feat: [DI-22550] - Enhance date range picker component (#11495) * feat: [DI-22550] - Enhanced default value logic * feat: [DI-22550] - Added logic to disable end date calendar dates which are before selected start date * feat: [DI-222550] - Updated test cases * feat: [DI-22550] - Updated test case * feat: [DI-22550] - Updated test cases * feat: [DI-22550] - Added disabled support for timezone * feat: [DI-22550] - Added qa id * feat: [DI-22550] - Added Calcutta as additional timezone for IST * feat: [DI-22550] - Removed error from date picker on click preset button * feat: [DI-22550] - Remove end date error condition * Added changeset * updated changeset * feat: [DI-22550] - Removed unused variable * feat: [DI-22550] - fix typechek error * upcoming: [M3-8921] - Limits Evolution foundations (#11493) * Add quota API types and endpoints * Add limitsEvolution feature flag * Update Quotas API types * Add Quotas to MSW CRUD preset * Added changeset: Quotas feature flag and MSW CRUD preset support * Added changeset: Types for Quotas endpoints * Move changeset to upcoming * Add quota query keys and hooks * Latest API changes * Feedback @abailly-akamai * test: [M3-9123] - Reset test account preferences when Cypress starts (#11522) * Reset test account preferences when environment variable is set * Reset GHA test account preferences on run start * Added changeset: Add `CY_TEST_RESET_PREFERENCES` env var to reset user preferences at test run start * fix: [DI-22875] - Zoom-in icon hover effect fix in CloudPulse (#11526) * upcoming: [DI-22875] - Zoom-in icon hover effect fix * upcoming: [DI-22875] - Naming correction * upcoming: [DI-22875] - Test case fix * upcoming: [DI-22875] - Add changeset * upcoming: [DI-22875] - Cypress update * refactor: [M3-8252] - Remove ramda from `DomainRecords` (Part 1) (#11514) * Remove ramda from `DomainRecords` pt1 * Added changeset: Remove ramda from `DomainRecords` pt1 * feat: [UIE-8136] - add new users table component (part 2) (#11402) * upcoming: [M3-9071] - Display cluster provisioning after an LKE-E cluster is created (#11518) ## Description 📝 We want to account for the differences in timing with node provisioning in LKE-E vs standard. For standard LKE, nodes are returned right when the cluster is created (and display status of provisioning), but that is not possible in enterprise because the machine resources are created only once the cluster is ready. So for the first ~5 minutes after a LKE-E cluster's creation, the details page displays 'No data to display' under node pools and this delay is not explained to the user. This PR improves the UX by displaying a cluster provisioning message when a cluster has been created within the first 10 minutes and there have been no nodes returned yet and also surfaces the number of nodes for each pool as added confirmation that the node allocation is correct. ## Changes 🔄 List any change(s) relevant to the reviewer. - Display cluster provisioning message in the cluster detail page if the cluster was created within the first 10 mins with no nodes returned - Display number of nodes for each pool - Update NodePool unit test ## How to test 🧪 ### Prerequisites (How to setup test environment) - Ensure you have LKE-E customer tags (check project tracker) ``` yarn test NodeTable ``` ### Verification steps (How to verify changes) - [ ] Create a LKE-E cluster - [ ] Observe the cluster details page. You should first see a cluster provisioning message in the Node Pools table while the cluster is provisioning. After ~5mins, you should see that replaced with the provisioning nodes - [ ] Unit tests pass and there are no regressions in the standard LKE cluster flow --------- Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com> * upcoming: [DI-22838] - Add Scaffolding for resources section in Cloud Pulse Alert details page (#11524) * upcoming: [DI-22132] - Initial changes for adding resources section * upcoming: [DI-22838] - Added unit tests * upcoming: [DI-22838] - Error message corrections * upcoming: [DI-22838] - Add a skeletal table * upcoming: [DI-22838] - Update comments * upcoming: [DI-22838] - Add UT for utils * upcoming: [DI-22838] - Code refactoring * upcoming: [DI-22838] - Add changeset * upcoming: [DI-22838] - Code refactoring for region filter * upcoming: [DI-22838] - Code refactoring for region filter * upcoming: [DI-22838] - Updated comments * upcoming: [DI-22838] - Code refactoring for utils * upcoming: [DI-22838] - Code refactoring * upcoming: [DI-22838] - Code comments * upcoming: [DI-22838] - Removed error text * upcoming: [DI-22838] - UT update for utils * upcoming: [DI-22838] - UT updates * upcoming: [DI-22838] - Import update for TableBody * upcoming: [DI-22838] - Event handler updates * upcoming: [DI-22838] - ESlint issue updates * upcoming: [DI-22838] - Variable name updates --------- Co-authored-by: vmangalr <vmangalr@akamai.com> * deps: [M3-9135] - Upgrade to TypeScript v5.7 (#11531) * update typescript to v5.7 * update typescript to v5.7 part 2 * revert extra change * revert extra change * revert extra change * revert extra change * add changeset --------- Co-authored-by: Banks Nussman <banks@nussman.us> * refactor: [M3-6919] - replace remaining react-select instances & types in Linodes Feature (#11509) * Type improvements and cleanup * ip sharing * select story fix * feedback @bnussman-akamai * Added changeset: Replace remaining react-select instances & types in Linodes Feature * feedback @dwiley-akamai * change: [M3-9132] – Revise description for "Disk Encryption" section in Linode Create flow (#11536) * upcoming: [DI - 22836] - Added AddNotificationChannel component (#11511) * upcoming: [22836] - Added Notification Channel Drawer component with relevant types,schemas * upcoming: [DI-22836] - adding changesets * upcoming: [DI-22836] - Renaming the type from ChannelTypes to ChannelType * upcoming: [DI-22836] - Fixing failing test * upcoming :[DI-22836] - Review changes: removing conditional rendering of Drawer component * upcoming: [DI-22836] - Review changes * upcoming: [DI-22836] - Removed the To label as per review comment * fix: Notice alignment and Linode details button spacing (#11535) ## Description 📝 Fix some Notice alignment regressions from #11480. (There might be more minor notice alignment issues but these were the ones I noticed) Also noticed the in-line action button padding looks off in the Linode entity header so adjusted that to match our other entity detail headers ## How to test 🧪 ### Verification steps (How to verify changes) - [ ] Try to power off a Linode to open the dialog, the alignment should be fixed - [ ] Go to Linode details page and notice in-line header buttons x padding matches LKE entity header - [ ] Go to StackScript Create, the tips box alignment should be fixed --------- Co-authored-by: Banks Nussman <banks@nussman.us> * test: [M3-9131] - Increase Linode clone timeout to 5 minutes (#11529) * Increase Linode clone timeout to 5 minutes * Added changeset: Increase timeouts when performing Linode clone operations * change: Improve search syntax for `+neq` (#11521) * improve not equal syntax * add changeset --------- Co-authored-by: Banks Nussman <banks@nussman.us> * refactor: [M3-6916] Replace EnhancedSelect with Autocomplete in: help (#11470) * refactor: [M3-6916] Replace EnhancedSelect with Autocomplete in: help * Added changeset: Replace EnhancedSelect with Autocomplete component in the Help feature * Fix search redirect and Autocomplete options width * Change hover colors * Remove Hover regression * Added Stlying as per the CDS Mockup * Cleanup * Replace colors with Design Tokens * Eliminate the use of classNames for `sx` components. * Cleanup * Add a note about necessary env vars for working search * Remove the use of `searchtext` prop --------- Co-authored-by: mjac0bs <mjacobs@akamai.com> * fix: [UIE-8386] - fix redirects to old route (#11539) Fix redirects from /account/ to /iam/ when editing the username or deleting the user. * feat: [M3-9158] - Add GPU plans support for LKE in Cloud Manager (#11544) * initial commit - add GPU split plan selection panel * test + banner display * update tables and test for consistency * Optimize refactor * remove test skipping * Added changeset: GPU plans in Kubernetes create flow * Allo GPU in add node pool drawer * fix: [M3-9156] - Linode Config Dialog misrepresenting primary interface (#11542) * initial refacror * more progress * clean up * add schema change * fix bug * more progress on clearable issue and clean up * fix spelling * sort props * changeset * fix typecheck * comment more * use getPrimaryInterfaceIndex for unrecommended config notice in subnet linode row - should work now... * add some comments * update cypress test to account for implicit primary VPC interfaces * fix typo * Apply suggestions from @dwiley-akamai Thanks! Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com> --------- Co-authored-by: Banks Nussman <banks@nussman.us> Co-authored-by: Connie Liu <coliu@akamai.com> Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com> * Cloud Manager v1.135, API v4 v0.133.0, Validation v0.59.0, and UI v0.6.0 * Update changelos --------- Co-authored-by: mpolotsk-akamai <157619599+mpolotsk-akamai@users.noreply.github.com> Co-authored-by: jdamore-linode <97627410+jdamore-linode@users.noreply.github.com> Co-authored-by: Jaalah Ramos <125309814+jaalah-akamai@users.noreply.github.com> Co-authored-by: Jaalah Ramos <jaalah.ramos@gmail.com> Co-authored-by: Hana Xu <hxu@akamai.com> Co-authored-by: Purvesh Makode <pmakode@akamai.com> Co-authored-by: aaleksee-akamai <aaleksee@akamai.com> Co-authored-by: hasyed-akamai <hasyed@akamai.com> Co-authored-by: dmcintyr-akamai <dmcintyr@akamai.com> Co-authored-by: Banks Nussman <115251059+bnussman-akamai@users.noreply.github.com> Co-authored-by: Banks Nussman <banks@nussman.us> Co-authored-by: venkatmano-akamai <chk-Venkatesh@outlook.com> Co-authored-by: vmangalr <vmangalr@akamai.com> Co-authored-by: Ankita <ankitaan@akamai.com> Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com> Co-authored-by: Connie Liu <139280159+coliu-akamai@users.noreply.github.com> Co-authored-by: Nikhil Agrawal <165884194+nikhagra-akamai@users.noreply.github.com> Co-authored-by: Hussain Khalil <122488130+hkhalil-akamai@users.noreply.github.com> Co-authored-by: Hana Xu <115299789+hana-akamai@users.noreply.github.com> Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com> Co-authored-by: santoshp210-akamai <159890961+santoshp210-akamai@users.noreply.github.com> Co-authored-by: mjac0bs <mjacobs@akamai.com> Co-authored-by: Connie Liu <coliu@akamai.com>
Description 📝
Refactor Domain Records
Changes 🔄
scrollErrorIntoView
withscrollErrorIntoView2
Target release date 🗓️
N/A
Preview 📷
No visual changes
How to test 🧪
Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed ✅