-
Notifications
You must be signed in to change notification settings - Fork 156
SkipNavigation improvements #4739
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
Conversation
LLM Analysis of PR ChangesSummaryThis PR introduces an Key Points to Review
Style & Consistency
|
Storybook staging is available at https://kiwicom-orbit-avi-skip-nav.surge.sh Playroom staging is available at https://kiwicom-orbit-avi-skip-nav.surge.sh/playroom |
Size Change: +44 B (+0.01%) Total Size: 464 kB
ℹ️ View Unchanged
|
@@ -80,6 +80,22 @@ export const Default: Story = { | |||
}, | |||
}; | |||
|
|||
export const InNavigationBar: Story = { | |||
render: () => ( | |||
<> |
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.
As this story should display SkipNavigation usage inside NavigationBar, let's use NavigationBar component here? I would also add isInNav
to controls.
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.
Made the edits, lmk if you'd prefer to add more controls fixup! feat(SkipNavigation): add isInNav prop for styling in navigation (will autosqash this commit later, it's for you to review it more easily)
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.
I like that you used the table to differentiate between SkipNavigation and NavigationBar props 👍
I think the controls you have are fine, tbh I thought you would just add isInNav
and transparentBgAtTop
and hardcode the rest 😅 We can keep all of them but I would probably move the args from both Playground and your new story and set it on meta so it's consistent with story files for other components. Or spread the args from the Playground story.
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.
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.
I meant to move those args to meta so that there are no empty values in your new story 😅 And keep controls for Default story disables. I apologise for confusion.
We usually followed this pattern - set all args/argTypes on meta, have Default story with disabled controls, have other stories with arg values inherited from meta and alternatively some unnecessary controls excluded and lastly Playground story with all controls inherited from meta. That's why I suggested to move it so you don't have to set new empty args on InNavigationBar but they can be inherited.
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.
I've checked random components and they differ - for example Button and CallOutBanner use controls also for the default story so I kept it also for this component. As for the special args I used different ones on purpose because I think in the header it will mostly be used in this simple form.
Regarding commits, I would say |
No, I think the type should remain as "fix". This fixes missing accessibility attributes and "fix" should be used for this type of issues too. "chore" is for maintenance tasks that don't modify source code or user-facing functionality. |
f6092ed
to
e433bf8
Compare
What happened with all those changed snapshots? |
@domihustinova the test were failing so I've merged the changes from master branch and let the github generate those so the changes are expected due to different macOs (the previous one were generated locally on my machine) |
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.
Key Issues
The use of @ts-expect-error
without proper type validation could lead to runtime errors, particularly if ref
is not a mutable type.
Closes FEPLT-2453
✨
Description by Callstackai
This PR improves the SkipNavigation component by adding new props for navigation integration and updating the documentation accordingly.
Diagrams of code changes
Files Changed
isInNav
prop.isInNav
prop.isInNav
prop.isInNav
prop.isInNav
prop for styling.isInNav
to the Props interface.This PR includes files in programming languages that we currently do not support. We have not reviewed files with the extensions
.md
,.mdx
. See list of supported languages.