Skip to content

Conversation

@fk
Copy link
Contributor

@fk fk commented Jul 5, 2018

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

  • does not allow subitems in top-level items w/o "turning them" into an accordion yet; link in a top-level item will be ignored if it also has subitems

  • fix 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.yaml to fit current docs, moved some things for testing

Fixes #6295, #6193

* 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
@gatsbybot
Copy link
Collaborator

gatsbybot commented Jul 5, 2018

Deploy preview for using-drupal ready!

Built with commit c0e2525

https://deploy-preview-6312--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jul 5, 2018

Deploy preview for gatsbygram ready!

Built with commit c0e2525

https://deploy-preview-6312--gatsbygram.netlify.com

@fk
Copy link
Contributor Author

fk commented Jul 5, 2018

fk added 8 commits July 5, 2018 22:44
* 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
@fk
Copy link
Contributor Author

fk commented Jul 6, 2018

OK, this has everything ready for #6245 (requires a few changes over there):

- title: Quick start
  link: /docs/

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:

image

@fk fk changed the title [WiP][www] First shot at fixing #6295 [www] Fix #6295 Jul 6, 2018
Copy link
Contributor

@m-allanson m-allanson left a comment

Choose a reason for hiding this comment

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

💥

@fk fk merged commit 2acc8b9 into gatsbyjs:master Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[www] IA redesign: Allow top-level links to pages

3 participants