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

fix: show secondary menu if even there is no main one #5262

Merged
merged 1 commit into from
Aug 2, 2021

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Jul 31, 2021

Motivation

A quick attempt to fix #5241

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Remove all navbar items in config file and go to docs page. Note that on regular pages such as homepage or blog pages, sidebar icon will not be displayed.

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.)

@lex111 lex111 added the pr: bug fix This PR fixes a bug in a past release. label Jul 31, 2021
@lex111 lex111 requested a review from slorber as a code owner July 31, 2021 08:29
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 31, 2021
@lex111
Copy link
Contributor Author

lex111 commented Jul 31, 2021

Maybe we should move the color toggle to navbar on mobiles? For example, when there are no navbar items, sidebar icon will not be displayed, consequently users will not have ability to switch color mode. Actually, when there are navbar items it is not immediately obvious that site has color toggle, this will be clearly seen only if user open mobile sidebar.

2021-07-31_11-16

@netlify
Copy link

netlify bot commented Jul 31, 2021

✔️ [V2]

🔨 Explore the source changes: ce2e3a5

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61050a04d5c74e0007a719cd

😎 Browse the preview: https://deploy-preview-5262--docusaurus-2.netlify.app

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 82
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5262--docusaurus-2.netlify.app/

@github-actions
Copy link

Size Change: -6 B (0%)

Total Size: 905 kB

ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/globalData.json 71.3 kB 0 B
website/build/assets/css/styles.********.css 93.4 kB 0 B
website/build/assets/js/main.********.js 495 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus/index.html 62.5 kB 0 B
website/build/blog/index.html 26.4 kB 0 B
website/build/docs/index.html 40.6 kB -3 B (0%)
website/build/docs/installation/index.html 48.2 kB -3 B (0%)
website/build/index.html 27.4 kB 0 B
website/build/tests/docs/index.html 21.2 kB 0 B
website/build/tests/docs/standalone/index.html 19.1 kB 0 B

compressed-size-action

@slorber
Copy link
Collaborator

slorber commented Aug 2, 2021

Thanks 👍 looks great

Maybe we should move the color toggle to navbar on mobiles?

That would be a quite specific case to handle. An empty navar is unusual and the user reported that , was only using the docs-only mode. I suggest we wait for someone to come-up with the need for this before we implement something that nobody would use :)

@slorber slorber merged commit 8a198ef into master Aug 2, 2021
@slorber slorber deleted the lex111/iss5241 branch August 2, 2021 09:16
Josh-Cena pushed a commit to Josh-Cena/docusaurus that referenced this pull request Aug 2, 2021
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: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The doc sidebar in the main menu is not available
3 participants