Skip to content
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

SideNav: adding box-shadow under focus pseudo selector (#1219) #1227

Merged

Conversation

stephenotalora
Copy link
Contributor

@stephenotalora stephenotalora commented May 14, 2021

Describe your changes here.

Closes #1219 - SideNav focus state is hard to see, the purpose of this PR is to bring the component closer to the Primer CSS proposal to use state-focus-shadow to add a blue box-shadow instead of the subtle background color. For more details on the merged proposal please see primer/css#1391

Screenshots

Before:

Screen.Recording.2021-05-14.at.11.23.44.AM.mov

After:

Screen.Recording.2021-05-14.at.11.25.32.AM.mov

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox - primer component example needs tab index
  • Tested in Safari - primer component example needs tab index
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@changeset-bot
Copy link

changeset-bot bot commented May 14, 2021

🦋 Changeset detected

Latest commit: 4b21749

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/components Patch

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

@vercel
Copy link

vercel bot commented May 14, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/primer-components/Hp1DEzKhY2WKP3GUBBVQ1Bfn7Csj
✅ Preview: https://primer-compone-git-fork-stephenotalora-stephenotalora-si-5eadb5.vercel.app

@vercel vercel bot temporarily deployed to Preview May 14, 2021 18:45 Inactive
@vercel vercel bot temporarily deployed to Preview May 14, 2021 18:58 Inactive
@@ -97,6 +103,13 @@ const SideNavLink = styled(Link).attrs<StyledSideNavLinkProps>(props => {

&:first-child {
border-top: 0;
border-top-right-radius: ${get('radii.2')};
border-top-left-radius: ${get('radii.2')};
Copy link
Contributor Author

@stephenotalora stephenotalora May 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved this down from lines 82 - 91 due do to the following:

Screen Shot 2021-05-13 at 8 46 55 PM

for the lightweight version of the component, the previous version was adding a border-radius to both the top and the bottom, which becomes very noticeable when using the box-shadow property. If the border-radius is still desired for the lightweight version I can revert this specific change, I just thought that it looks a little odd for the lightweight version but happy to discuss 🙂

@vercel vercel bot temporarily deployed to Preview May 14, 2021 22:05 Inactive
Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @stephenotalora! ✨ So much better.

@colebemis colebemis merged commit 11531a0 into primer:main May 14, 2021
@github-actions github-actions bot mentioned this pull request May 14, 2021
@stephenotalora stephenotalora deleted the stephenotalora-sidenavfocus-1219 branch May 14, 2021 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SideNav's focus state is hard to see
2 participants