-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Navigation: Upsize back buttons #68157
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,8 @@ export function NavigationItem( props: NavigationItemProps ) { | |
? restProps | ||
: { | ||
as: Button, | ||
__next40pxDefaultSize: | ||
'as' in restProps ? restProps.as === undefined : true, | ||
Comment on lines
+82
to
+83
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just to ensure that this usage is safe for the 40px default size, and won't log deprecation warnings. There should be no visual changes to the navigation items, as their sizes are already overridden. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense, we want to apply To be extra safe, should we also set it to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good edge case thinking 😄 The reasoning here is that, if there's a Button size violation the console warning will say "wp.components.Button", even if it came from within the NavigationItem black box. That can be confusing to a consumer because for all they know, they just used a |
||
href, | ||
onClick: onItemClick, | ||
'aria-current': isActive ? 'page' : undefined, | ||
|
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.
The back buttons should now have 40px height.
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.
They do 👍