Add ability to specify sub categories in sidebar.json#891
Add ability to specify sub categories in sidebar.json#891yangshun merged 1 commit intofacebook:masterfrom
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 cla@fb.com. Thanks! |
|
Deploy preview for docusaurus-preview ready! Built with commit e5228ac |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
@WillBrock Sorry I clicked the wrong button. Could you resubmit the PR? Very sorry. |
Motivation
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.