-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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(content-docs): clean up sidebars logic; validate generator returns #6596
Conversation
\\"collapsible\\": true, | ||
\\"collapsed\\": true | ||
\\"collapsed\\": true, | ||
\\"collapsible\\": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very annoying, but Jest wants to reorder object keys in a snapshot even when the value doesn't change...
✔️ [V2] 🔨 Explore the source changes: c23058b 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61fbea653c301700088ca240 😎 Browse the preview: https://deploy-preview-6596--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6596--docusaurus-2.netlify.app/ |
Size Change: 0 B Total Size: 766 kB ℹ️ View Unchanged
|
It will be quite hard for me to review this PR 😅 next time try to do it in 2 steps:
If you think it's safe to merge, then I trust you considering overall it looks fine |
I didn't change any behavior; just shifted the steps (unless you count that one extra validate line as a behavior change). If I don't reorganize the workflow there's basically no meaningful refactor. And, the end behavior is exactly the same. Evidence: no snapshots from outside the sidebars folder have changed I do plan to self-merge this because I understand the difficulty to review :D Just doing last bits of cleanup |
Yes, all the default values are applied during post-processing now. This means the generator can return a shape that's very similar to user config and it can still be correctly normalized |
Motivation
Tweak the sidebar loading order again, after we have a much more complicated logic. This clears all the TODOs. I have also written some brief internal docs on the holistic views of these functions.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
All tests still pass.