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(v2): sidebar_label should be used to compute next/previous button labels #4970

Merged
merged 3 commits into from
Jun 15, 2021

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Jun 15, 2021

Motivation

Fixes #4929

Our doc says:

sidebar_label: The text shown in the document sidebar and in the next/previous button for this document. If this field is not present, the document's sidebar_label will default to its title

This behavior makes sense as the paginated navigation is related to the sidebar, and in both cases we have constrained width and need to use shorter text-only (non-jsx) labels.

In practice, I think this behavior has never been implemented, so let's implement it now + add tests to make sure it stays there

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

tests

@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Jun 15, 2021
@slorber slorber requested a review from lex111 as a code owner June 15, 2021 08:59
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 15, 2021
@netlify
Copy link

netlify bot commented Jun 15, 2021

✔️ [V2]

🔨 Explore the source changes: e2fa41c

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

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

@github-actions
Copy link

github-actions bot commented Jun 15, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 68
🟢 Accessibility 97
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

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

@github-actions
Copy link

github-actions bot commented Jun 15, 2021

Size Change: 0 B

Total Size: 621 kB

ℹ️ View Unchanged
Filename Size Change
website/build/assets/css/styles.********.css 87.8 kB 0 B
website/build/assets/js/main.********.js 444 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus/index.html 62.2 kB 0 B
website/build/docs/introduction/index.html 235 B 0 B
website/build/index.html 27 kB 0 B

compressed-size-action

@slorber slorber merged commit 737f80a into master Jun 15, 2021
@slorber slorber deleted the slorber/fix-doc-pagination-labels branch August 17, 2021 18:01
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 text in previous/next buttons has changed
3 participants