-
Notifications
You must be signed in to change notification settings - Fork 37
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
Allow text wrapping in AnchorNav #842
Conversation
🦋 Changeset detectedLatest commit: 81e5bd4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🟢 No design token changes found |
bfa894a
to
cd755f3
Compare
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
@@ -134,7 +134,7 @@ | |||
*/ | |||
.AnchorNav-link { | |||
display: flex; | |||
width: calc(100% - 80px); |
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 can't remember what that 80px was originally doing, but it was probably something important 😄. Do you know @joshfarrant?
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'm not entirely sure if I'm honest @rezrah. If you look at the snapshots you can see (by looking at the focus border) that the item was 80px narrower than you'd probably expect it to be. Maybe something in the implementation changed since this component was created which rendered that 80px no longer useful?
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.
No worries, not a blocker
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.
LGTM. Could you take a look at the snapshots again please, looks like there might be an issue there?
Summary
Allow AnchorNav links to reflow on narrow viewports.
I'm not sure the component is meant to support longer link names in the first place as they don't look great on desktop, but for those cases where the text might just break onto the next line this change does offer a slightly better experience.
Note that this change doesn't make the AnchorNav work perfectly with arbitrarily-long link names, but it does make it a bit more flexible.
Steps to test:
Supporting resources (related issues, external links, etc):
Contributor checklist:
update snapshots
label to the PR)Reviewer checklist:
Screenshots: