-
Notifications
You must be signed in to change notification settings - Fork 365
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
fix: [M3-7204] - Notice fix & improvements #9755
Conversation
export const Notice = (props: NoticeProps) => { | ||
const { | ||
breakWords, | ||
bypassValidation = false, |
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.
This is the new prop. Only applied in one instance as part of this PR (SelectPlan panel for GPU and premium)
Everything looks good to me from UI and functionality, in particular the focus on the root password field on form validation. Left a comment where I believe you missed a typo or forgot to make some minor edit. |
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.
Lots of great clean up here, including the story revamp! And thanks for the clear testing instructions -- confirmed that the password field, when left blank and form is submitted, does scroll into view with an error. I haven't seen any skinny notices across the app. Also confirmed that breakWords
, flag
, and notificationList
were unused Notice props.
Left a couple small comments, but 🚢 .
packages/manager/src/features/Linodes/LinodesCreate/PlansAvailabilityNotice.tsx
Outdated
Show resolved
Hide resolved
80de06d
to
651ec7c
Compare
Description 📝
This PR fixes an issue where a Notice is included in an error group but should be treated as a "static" error, meaning that is not being picked up by the scroll-to-error util when it shouldn't (those are for "dynamic" errors, usually when submitting a form). This creates two issues, one being scrolling to this error when intended to scroll to a relevant form submission error, two preventing the scroll to error from happening all together if the notice isn't visible on the page (ex: Linode create flow, hidden in the gpu or premium tab):
It is a bug that bothers me much because missing the root password step in this form is quite easy
Additionally, the PR refactors the Notice to align with our coding standards.
Changes 🔄
bypassValidation
prop to declare a notice as being static and excluded from an error groupbreakWords
,notificationList
&flag
which are not in used in the codebase and shouldn'timportant
notices (fixing a regression where they became very skinny)Preview 📷
The changes shown here should be the only visual changes this PR introduces. Otherwise notices should look the same, and feature the same typography & spacing attributes
How to test 🧪
Linode Create bug (compare with production)
Storybook
yarn storybook
and navigate to the new storyOveral Styling