Uh oh!
There was an error while loading. Please reload this page.
[WIP] Replace UnderlineNav component - #2017
Conversation
|
size-limit report 📦
|
langermank
commented
Apr 11, 2022
Hi @pksjce! We have an upcoming major release for PCSS that includes some visual improvements for UnderlineNav. Its nothing drastic, but does improve the experience when items are focused. It also upstreams some CSS from dotcom that uses CSS Let me know if you want to sync on any of this, happy to chat! I'm not sure the scope of this work either but wanted to make sure this release from PCSS is on your radar. |
| paddingX: get('space.2'), | ||
| paddingY: get('space.3'), | ||
| marginRight: get('space.3'), | ||
| fontSize: get('fontSizes.1'), |
There was a problem hiding this comment.
get() shouldn't be necessary since this object is passed to the sx prop
There was a problem hiding this comment.
I'm not sure. whats the alternative? It doesn't seem to work without the get.
| } | ||
| const iconWrapStyles = { | ||
| display: 'inline-block', | ||
| marginRight: '8px' |
There was a problem hiding this comment.
| marginRight: '8px' | |
| marginRight: 2 |
| export const UnderlineNavLink = ({ | ||
| sx: sxProp = {}, | ||
| href = '#', | ||
| children, | ||
| selected = false, | ||
| leadingIcon: LeadingIcon, | ||
| ...props |
There was a problem hiding this comment.
Should we support the as prop to allow people to use React Router-like link components?
pksjce
commented
Apr 14, 2022
Here's a loom of me demo-ing what's possible with the new implementation of |
pksjce
commented
May 9, 2022
Working on making a responsive UnderlineNav
|
Hi @pksjce Thank you for the video 🎊 I've noticed that the responsive behaviour behaves a lot different to what we do right now in repositories We only show the 3 dots more button when the content overflows. If the content fits we never show the 3 dots more button. You might want to sync up with @langermank or @vdepizzol on this behaviour as I saw designs where we add an additional more item to the end of the nav items when the content doesn't fit instead of the 3 dots button. Example: |
maximedegreve
commented
May 25, 2022
Hi @pksjce is there any update on above? |
pksjce
commented
Jun 23, 2022
Closing this as I'm continuing the work in #2142 |


Describe your changes here.
This PR implements new version of UnderlineNav as per https://github.com/github/primer/issues/892
Why is this work being done?
The current UnderlineNav is outdated and not adequate in the following ways.
aria-labelandaria-current-page.My proposal with this PR is
UnderlineNavwhile changing all of its internals and adding new API for icons and accessibilityPending things to merge this PR.
Closeshttps://github.com/github/primer/issues/892
Screenshots
Please provide before/after screenshots for any visual changes
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.