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

Add permalink spacing handling to subnav when its sticky #391

Merged
merged 2 commits into from
Oct 12, 2021

Conversation

jescalan
Copy link
Contributor

🎟️ Asana Task
πŸ” Preview Link


Description

When the subnav is in sticky mode, and you have a permalink on the page, the headline ends up scrolling underneath the menu. This little css thingy prevents that from happening. It used to be implemented on each of our documentation sites hanging off the global .g-subnav but that no longer works because of css modules, and honestly it should have been part of this component anyway since I can't really imagine a scenario where you would want your permalinks to be hidden by this component, so I think this should do the trick. Tested on vault docs website and it worked wonderfully.

PR Checklist πŸš€

Items in this checklist may not may not apply to your PR, but please consider each item carefully.

  • Add Asana and Preview links above.
  • Conduct thorough self-review.
  • Add or update tests as appropriate.
  • Conduct reasonable cross browser testing for both compatibility and responsive behavior (We have a Sauce Labs account for this, if you don't have access, just ask!).
  • Conduct reasonable accessibility review (use the WAS as a guide or an axe browser plugin until we establish more formal checks).
  • Identify (in the description above) and document (add Asana tasks on this board) any technical debt that you're aware of, but are not addressing as part of this PR.

@jescalan jescalan requested a review from a team October 12, 2021 01:27
@changeset-bot
Copy link

changeset-bot bot commented Oct 12, 2021

πŸ¦‹ Changeset detected

Latest commit: a081f03

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

This PR includes changesets to release 1 package
Name Type
@hashicorp/react-subnav 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 Oct 12, 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/hashicorp/react-components/65uJkXStsVtjFTWseBZfANifDzoQ
βœ… Preview: https://react-components-git-jeadd-permalink-handling-fd03a5-hashicorp.vercel.app

Copy link
Contributor

@BRKalow BRKalow left a comment

Choose a reason for hiding this comment

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

Nice, thanks. I had seen this during the upgrade and was wondering what exactly it was for.

@jescalan jescalan merged commit f0b43a7 into main Oct 12, 2021
@jescalan jescalan deleted the je.add-permalink-handling-to-sticky-subnav branch October 12, 2021 01:54
@github-actions github-actions bot mentioned this pull request Oct 12, 2021
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.

None yet

2 participants