Skip to content

refactor: [UIE-9325] - Replace Formik with React Hook Form in AddAccessControlDrawer#13044

Merged
hana-akamai merged 9 commits intolinode:developfrom
hana-akamai:UIE-9325-refactor-database-add-access-control-drawer
Nov 6, 2025
Merged

refactor: [UIE-9325] - Replace Formik with React Hook Form in AddAccessControlDrawer#13044
hana-akamai merged 9 commits intolinode:developfrom
hana-akamai:UIE-9325-refactor-database-add-access-control-drawer

Conversation

@hana-akamai
Copy link
Contributor

@hana-akamai hana-akamai commented Oct 31, 2025

Description 📝

Refactor Database Manage Networking drawer to use React Hook Form instead of Formik

Changes 🔄

  • There should be no visual external changes other than IP validation on blur instead of after clicking Update Access Controls

Scope 🚢

Upon production release, changes in this PR will be visible to:

  • All customers
  • Some customers (e.g. in Beta or Limited Availability)
  • No customers / Not applicable

How to test 🧪

Prerequisites

(How to setup test environment)

  • Have the Database VPC feature flag enabled

Verification steps

(How to verify changes)

  • Test adding/editing IPs in the Database landing page via Manage Access Controls action dropdown
  • Test adding/editing IPs in the Database details page via the Networking tab
  • There should be no regressions compared to prod, error messages should display
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


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@hana-akamai hana-akamai self-assigned this Oct 31, 2025
@hana-akamai hana-akamai added DBaaS Relates to Database as a Service Clean Up labels Oct 31, 2025
@hana-akamai hana-akamai marked this pull request as ready for review October 31, 2025 19:04
@hana-akamai hana-akamai requested a review from a team as a code owner October 31, 2025 19:04
"@linode/manager": Tech Stories
---

Replace Formik with React Hook Form in DatabaseManageNetworkingDrawer ([#13002](https://github.com/linode/manager/pull/13002))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to add a changeset to the other PR so adding it here!

allow_list: ExtendedIP[];
}

export const ManageAccessControlDrawer = (props: Props) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed file from AddAccessControlDrawer to ManageAccessControlDrawer and refactored formik logic to react hook form

@smans-akamai smans-akamai self-requested a review November 5, 2025 20:32
Comment on lines -73 to -80
let ipString = extendedIPToString(currentIP);
if (ipString === '') {
return acc;
}
const allowList = getValues('allow_list');

if (ipString.indexOf('/') === -1) {
ipString += '/32';
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleValidateIPs already handles this so removed and simplified the reduce to a map below

Copy link
Contributor

@smans-akamai smans-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for applying my feedback! The changes look good so I'm approving!

Copy link
Contributor

@dwiley-akamai dwiley-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ✅
Verification steps ✅

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Nov 6, 2025
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 5 failing tests on test run #8 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
5 Failing856 Passing11 Skipped48m 22s

Details

Failing Tests
SpecTest
timerange-verification.spec.tsCloud Manager Cypress Tests→Integration tests for verifying Cloudpulse custom and preset configurations » should implement and validate custom date/time picker for a specific date and time range
update-stackscripts.spec.tsCloud Manager Cypress Tests→Update stackscripts » updates a StackScript
clone-linode.spec.tsCloud Manager Cypress Tests→clone linode » can clone a Linode from Linode details page
search-images.spec.tsCloud Manager Cypress Tests→Search Images » creates two images and make sure they show up in the table and are searchable
create-stackscripts.spec.tsCloud Manager Cypress Tests→Create stackscripts » creates a StackScript and deploys a Linode with it

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/cloudpulse/timerange-verification.spec.ts,cypress/e2e/core/stackscripts/update-stackscripts.spec.ts,cypress/e2e/core/linodes/clone-linode.spec.ts,cypress/e2e/core/images/search-images.spec.ts,cypress/e2e/core/stackscripts/create-stackscripts.spec.ts"

@hana-akamai hana-akamai merged commit fa3304b into linode:develop Nov 6, 2025
34 of 35 checks passed
@hana-akamai hana-akamai deleted the UIE-9325-refactor-database-add-access-control-drawer branch November 6, 2025 21:16
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Nov 6, 2025
abailly-akamai pushed a commit to abailly-akamai/manager that referenced this pull request Nov 7, 2025
…ssControlDrawer (linode#13044)

## Description 📝

Refactor Database Manage Networking drawer to use React Hook Form instead of Formik

## Changes  🔄

- There should be no visual external changes other than IP validation on blur instead of after clicking Update Access Controls

## How to test 🧪

### Prerequisites

(How to setup test environment)

- Have the Database VPC feature flag enabled

### Verification steps

(How to verify changes)

- [ ] Test adding/editing IPs in the Database landing page via Manage Access Controls action dropdown
- [ ] Test adding/editing IPs in the Database details page via the Networking tab
- [ ] There should be no regressions compared to prod, error messages should display
abailly-akamai added a commit that referenced this pull request Nov 7, 2025
* initial commit

* Added changeset: Address oAuth issue with IAM OAuthCallback

* fix: [UIE-9456 & UIE-9457] - Typo + expose search filters on /iam/roles route (#13034)

* UIE-9456 & UIE-9457

* test

* Added changeset: Typo + expose search filters on /iam/roles route

* feat: [UIE-9481] - IAM: add perm check for the drawer (#13043)

* feat: [UIE-9481] - IAM: add perm check for the drawer

* Added changeset: IAM: add a permission check for delete nodebalancer drawer

* feat: [UIE-9503] - add empty state to Default Roles/Entities tab (#13042)

* feat: add empty state to Default Roles/Entities table

* Added changeset: IAM: Empty state for the Default Roles and Default Entities Access tabs

* update text

* add unit tests

* review fix

* unit test fix

* fix: [UIE-9478] - IAM: disable tag edit (#13046)

* fix: [UIE-9478] - IAM: disable tag edit

* Added changeset: IAM: tags editing was enabled for restricted users

* fix: [UIE-9478] - add tooltip, disable manage tags in Volume action menu

* style fix

* Cloud version 1.154.0, API v4 version 0.152.0, Validation version 0.78.0, UI version 0.23.0

* Cloud version 1.154.0, API v4 version 0.152.0, Validation version 0.78.0, UI version 0.23.0

* fix: [M3-10698] - Update linode/clone endpoint and label calculations for < 1 hour (#13045)

* fix: [M3-9498] - Update linode/clone endpoint and label calculations for < 1 hour

* Add changelogs

---------

Co-authored-by: Jaalah Ramos <jaalah.ramos@gmail.com>

* fix: [UIE-9520] - IAM Child Account - user not found error handling (#13047)

* try/cath child user query

* consistent handling

* types

* Added changeset: IAM Child Account - user not found error handling

* fix: [UIE-9477] - IAM: disable delete and detach popups for Volumes when user has no permissions (#13049)

* fix: [UIE-9477] - IAM: Disable delete and detach popups for Volumes if no permissions

* Added changeset: IAM: restricted  users could access delete and detach popups without permissions

* upcoming: [UIE-9434] - Create feature flag for generational compute plans (#13054)

* upcoming: [UIE-9434] - Create feature flag for generational compute plans

* Added changeset: Feature flag for Generational Compute plans

* test: [DPS-34825] Add cypress tests for Create/Edit Stream forms and Streams Landing (#13008)

* refactor: [DI-27807] - Change status of edit & delete button in alert list table based on status (#13052)

* refactor: [DI-27807] - Change status of edit & delete button in alert list table based on status

* Added comment

* Added changeset

* refactor: [DI-27807] - Updated test cases

* upcoming: [UIE-9368] - Create a firewall Rulesets & Preflixlists feature flag (#13051)

* Add firewall rs & pl feature flag

* Added changeset: Feature flag for Firewall Rulesets & Prefixlists

* feat: [UIE-9341, UIE-9342, UIE-9521] - IAM: fix perm for vpcs (#13050)

* UIE-9342

* UIE-9341

* feat: [UIE-9341, UIE-9342, UIE-9521] - IAM: fix perm for vpc

* Added changeset: IAM: fix permissiom's check for vpc for assigning/unassigning linodes

* filter linodes

* e2e deferred getLinodes call

---------

Co-authored-by: Alban Bailly <abailly@akamai.com>

* refactor: [UIE-9325] - Replace Formik with React Hook Form in AddAccessControlDrawer (#13044)

## Description 📝

Refactor Database Manage Networking drawer to use React Hook Form instead of Formik

## Changes  🔄

- There should be no visual external changes other than IP validation on blur instead of after clicking Update Access Controls

## How to test 🧪

### Prerequisites

(How to setup test environment)

- Have the Database VPC feature flag enabled

### Verification steps

(How to verify changes)

- [ ] Test adding/editing IPs in the Database landing page via Manage Access Controls action dropdown
- [ ] Test adding/editing IPs in the Database details page via the Networking tab
- [ ] There should be no regressions compared to prod, error messages should display

* [UIE-9533] -Hopeful fix: Race condition with Preferences overrides in PrimaryNav (#13056)

* attempt to rule out any race condition

* comments

* code and fixes

* cleanup

* Added changeset: Race condition with Preferences overrides in PrimaryNav

* feat: [UIE-9393] - IAM Parent/Child: delegate permissions for child account (#13033)

* feat: [UIE-9393] - IAM Parent/Child: delegate permissions for child account

* changesets

* remove the unrestricted check for query

* fix conflict

* e2e gating

* lint fix

* better approach to fixing e2e

* Mock IAM to be disabled in Account Switching test

---------

Co-authored-by: Alban Bailly <abailly@akamai.com>
Co-authored-by: Alban Bailly <130582365+abailly-akamai@users.noreply.github.com>
Co-authored-by: Joe D'Amore <jdamore@akamai.com>

* feat: [UIE-9534] - IAM: fix perm for nodebalancer (#13058)

* feat: [UIE-9534] - IAM: add tooltips

* Added changeset: IAM: add tooltips for disabled buttons for nodebalancers, remove notification banner

* update text

* remove tooltip

* change:[UIE-9541] Add MSW crud support for types API (#13067)

* change:[UIE-9541] Add MSW crud support for types API

* Added changeset: Add MSW crud support for types API

* Added changeset: Add MSW crud support for types API

---------

Co-authored-by: aaleksee-akamai <aaleksee@akamai.com>
Co-authored-by: mpolotsk-akamai <157619599+mpolotsk-akamai@users.noreply.github.com>
Co-authored-by: Dajahi Wiley <dwiley@linode.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: grevanak-akamai <145482092+grevanak-akamai@users.noreply.github.com>
Co-authored-by: mduda-akamai <mduda@akamai.com>
Co-authored-by: Nikhil Agrawal <165884194+nikhagra-akamai@users.noreply.github.com>
Co-authored-by: Purvesh Makode <pmakode@akamai.com>
Co-authored-by: Hana Xu <115299789+hana-akamai@users.noreply.github.com>
Co-authored-by: Joe D'Amore <jdamore@akamai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Clean Up DBaaS Relates to Database as a Service

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants