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

refactor: various TOC improvements #5627

Merged
merged 1 commit into from
Sep 30, 2021
Merged

refactor: various TOC improvements #5627

merged 1 commit into from
Sep 30, 2021

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Sep 29, 2021

Motivation

  • Remove unnecessary heading level-specific classes (use h tags instead)
  • Remove empty class attributes from final HTML markup
  • Remove extra default values for props in child component (since parent one already passes them)

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

@lex111 lex111 added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Sep 29, 2021

return Array.from(document.querySelectorAll(selector)) as HTMLElement[];
return Array.from(
document.querySelectorAll(selectors.join()),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There seems to be no point in creating temporary variable and adding spaces after comma.

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Sep 29, 2021
@netlify
Copy link

netlify bot commented Sep 29, 2021

✔️ [V2]

🔨 Explore the source changes: bff29ce

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

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

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

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

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

@github-actions
Copy link

Size Change: -335 B (0%)

Total Size: 834 kB

Filename Size Change
website/build/blog/2017/12/14/introducing-docusaurus/index.html 67 kB -66 B (0%)
website/build/docs/index.html 44.5 kB -156 B (0%)
website/build/docs/installation/index.html 52.7 kB -90 B (0%)
ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/globalData.json 38.5 kB 0 B
website/build/assets/css/styles.********.css 94 kB 0 B
website/build/assets/js/main.********.js 420 kB -23 B (0%)
website/build/blog/index.html 38 kB 0 B
website/build/index.html 30.8 kB 0 B
website/build/tests/docs/index.html 25.5 kB 0 B
website/build/tests/docs/standalone/index.html 22.9 kB 0 B

compressed-size-action

@slorber
Copy link
Collaborator

slorber commented Sep 30, 2021

LGTM 👍 thanks

@slorber slorber merged commit 4dbc458 into main Sep 30, 2021
@slorber slorber deleted the lex111/toc-imp branch September 30, 2021 10:22
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: polish This PR adds a very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants