-
-
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
feat: sub-categories in sidebar.json #892
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Deploy preview for docusaurus-preview ready! Built with commit ce549c0 |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Thanks for the PR and sorry for getting back so late. This is quite a huge change so it will take a while for review. Update:
|
+1 |
Hi. I see the comments about "less likely to accept v1 PRs". I'm a Redux maintainer, and we're currently investigating switching our docs site at https://redux.js.org to Docusaurus. We've already set it up for the new React-Redux docs page at https://react-redux.js.org . The Redux docs have multiple levels of nesting in some places. While we're planning on restructuring the docs content itself in the near future, it would be really helpful if we could keep the existing structure for now as part of a switch to Docusaurus. Would it be possible to get this PR merged in soon (like, the next few days)? |
Hey @markerikson, that's cool! We'd definitely consider that. I'll look into this further tonight. May I know the reason that you're migrating the Redux docs over from Gitbook to Docusaurus? As far as I can tell, the current Redux docs look great! |
@yangshun : sure, there's several reasons:
|
a68daf6
to
df615c6
Compare
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.
@markerikson it's been shipped! Many thanks to @endiliey for making it happen. We'll release v1.4.1 release very soon (within the next few days) and Redux would be able to use it. |
Motivation
Close #410
Close #948
Some users would like to be able to specify sub categories in the sidebar as discussed in #410.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Added unit tests for the functions that were modified and visually verified existing sidebars function the same as well as the new sub categories.
Example sidebars:
First attempt at implementing this, let me know if some things should be changed. I changed a couple of the functions around to make them easier to write tests against. In the future we could add tests to the rest of the functions in readMetadata.js as well.
Note: We could maybe do some type of accordion for the sub categories if wanted.