fix: [UIE-9832] - Database advanced config inline errors not displaying#13350
Conversation
Cloud Manager UI test results🔺 1 failing test on test run #3 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/linodes/clone-linode.spec.ts" |
|||||||||||||||||
bnussman-akamai
left a comment
There was a problem hiding this comment.
Nice fixes. Love seeing react-hook-form's error handling working well for us
| }); | ||
|
|
||
| const configs = watch('configs'); | ||
| const configs = useWatch({ control, name: 'configs' }); |
There was a problem hiding this comment.
No concerns with this change, just a small note:
Because useWatch is mounted at the same level as the useForm, I don't think there is any re-render benefit to using useWatch over watch in this case. In this case, if configs change, this component will re-render the same number of times with either approach.
From my understanding, useWatch is only useful for minimizing re-renders when used in a child component of react-hook-form's FormProvider in more complex forms.
smans-akamai
left a comment
There was a problem hiding this comment.
Followed the steps to reproduce the error in both scenarios and see the inline errors and error banner displaying as expected!
Description 📝
Fix some advanced config inline errors not displaying such as
synchronous_replicationfor pgbouncer clustersChanges 🔄
Scope 🚢
Upon production release, changes in this PR will be visible to:
Target release date 🗓️
Next release
Preview 📷
How to test 🧪
Prerequisites
(How to setup test environment)
Reproduction steps
(How to reproduce the issue, if applicable)
synchronous_replicationconfig option with the value beingquorumSaveand observe the network error but no error displayed in the formVerification steps
(How to verify changes)
synchronous_replicationconfig option with the value beingquorumSave, observe the network error and there should be an inline error displayed in the formAuthor 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 ✅