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

feat(v2): nav dropdown #2487

Merged
merged 3 commits into from
Mar 31, 2020
Merged

feat(v2): nav dropdown #2487

merged 3 commits into from
Mar 31, 2020

Conversation

yangshun
Copy link
Contributor

@yangshun yangshun commented Mar 31, 2020

Motivation

Fixes #2269

Allow specifying a nav dropdown from the theme config. This implementation is far from perfect and I'm kinda rushing it out for the release.

  • Only allows one layer of dropdown, which is acceptable for now since Infima only supports that
  • Doesn't allow collapsing in the mobile sidebar. I wanna try to reuse the menu components but it's not that easy

Screen Shot 2020-04-01 at 1 45 59 AM
Screen Shot 2020-04-01 at 1 45 47 AM

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 31, 2020
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Mar 31, 2020

Deploy preview for docusaurus-2 ready!

Built with commit 205fdfd

https://deploy-preview-2487--docusaurus-2.netlify.com

@lex111
Copy link
Contributor

lex111 commented Mar 31, 2020

On preview the first menu item "Docs" is not displayed

image

@yangshun
Copy link
Contributor Author

yangshun commented Mar 31, 2020

On preview the first menu item "Docs" is not displayed

Hmm you're right. The correct class names are not applied. I can't really figure out why, it works well in dev.

@yangshun
Copy link
Contributor Author

yangshun commented Mar 31, 2020

Found out why. I was using class={...} instead of className={...}. Thanks for catching!

@yangshun yangshun merged commit f96c2b6 into master Mar 31, 2020
@yangshun yangshun deleted the nav-dropdown branch March 31, 2020 19:10
@yangshun yangshun added the pr: new feature This PR adds a new API or behavior. label Mar 31, 2020
@fanny fanny mentioned this pull request Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v2] Navbar Dropdown Menu
4 participants