-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[www] Fix #6295 #6312
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
[www] Fix #6295 #6312
Conversation
* basically `section.js` becomes `item.js`—we don't expect every top-level sidebar `yaml` item to be "just" a container for a "section" (or group) of subitems anymore * got rid of the "base directory" setting in `section-list.js` to allow linking to pages not living in the main directory associated with the current sidebar (e.g. `docs` for `doc-links.yaml`) * solving the need of being able to put a link to "Tutorial" in the sidebar of "Docs": https://github.com/gatsbyjs/gatsby/blob/ba55b66e169a16bfb3333658ad804b7ef0d3d197/www/src/data/sidebars/doc-links.yaml#L7-L8 * all links in the sidebar `yaml` files have to be explicit again, e.g. `/docs/` can't be ommitted anymore; that allows the code to be quite a bit simpler TODO (WiP): * [ ] fix false multiple active items on the "Features" page * [ ] adjust sidebar item layout a bit * [ ] restore `doc-links.yaml` to fit current docs, moved some things for testing * [ ] naming is confusing in a couple of places right now
|
Deploy preview for using-drupal ready! Built with commit c0e2525 |
|
Deploy preview for gatsbygram ready! Built with commit c0e2525 |
|
Deploy preview: https://deploy-preview-6312--gatsbyjs.netlify.com/docs/ |
* move getActiveItem from item.js to body.js and loop over all items in sidebar (as opposed to run getActiveItem on each item individually) * rename `subitems` key to `items`
* reduce letter spacing for sidebar „headlines“/accordion toggle buttons (for both showcase and doc sidebar) * darken sidebar horizontal rules a little * a healthy amount of whitespace fixes for the top-level-item/-section mix * quick bespoke spacing fixes for the tutorial via `ui:tutorial` in `yaml` (fixes gatsbyjs#6193) * tutorial-style bullets for subitems everywhere * blockMarginBottom for vertical whitespace
|
OK, this has everything ready for #6245 (requires a few changes over there):
We most probably want to remove the bespoke styles for the "Tutorial" sidebar along with getting #6245 in—a really easy change. Those styles are a merely a quick fix to improve the current appearance of that sidebar as outlined in #6193: |
m-allanson
left a comment
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.
💥

basically
section.jsbecomesitem.js—we don't expect every top-level sidebaryamlitem to be "just" a container for a "section" (or group) of subitems anymoregot rid of the "base directory" setting in
section-list.jsto allow linking to pages not living in the main directory associated with the current sidebar (e.g.docsfordoc-links.yaml)gatsby/www/src/data/sidebars/doc-links.yaml
Lines 7 to 8 in ba55b66
/tutorial/instead of the above ;-)yamlfiles have to be explicit again, e.g./docs/can't be ommitted anymore; that allows the code to be quite a bit simplerdoes not allow subitems in top-level items w/o "turning them" into an accordion yet;
linkin a top-level item will be ignored if it also has subitemsfix false multiple active items on the "Features" page
adjust sidebar item layout a bit
naming is confusing in a couple of places right now
fix "Features" scrollspy
restore
doc-links.yamlto fit current docs, moved some things for testingFixes #6295, #6193