-
Notifications
You must be signed in to change notification settings - Fork 50.2k
[Gatsby Docs Update] Initial version of new sidebar #10707
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
[Gatsby Docs Update] Initial version of new sidebar #10707
Conversation
|
Major concerns here:
|
|
At this point if nobody has blockers I'm inclined to land this, so that anyone can work on top of it. Will do that tomorrow unless I get changes requested. 😁 |
**what is the change?:** - Adds media queries and JS to make sidebar collapse/expand from a sticky bottom bar on small screen sizes - Many TODOs still open! This is just an initial version. **why make this change?:** Moving closer to Joe's fantastic design. :) **test plan:** Manual testing - Flarnie will insert a gif **issue:** Various items under the `Sidebar Component` on this checklist; https://github.com/bvaughn/react/wiki/Gatsby-check-list
**what is the change?:** We skim the items in the 'defaultActiveSection' to find the currently active one, and display it's title in the sticky responsive bottom navbar. Before I had just plugged in the section title as a placeholder. **why make this change?:** It's better this way. One step closer to Joe's shiny new design. :) **test plan:** Manually tested (Flarnie will insert a screenshot) **issue:** Sidebar items on this checklist; https://github.com/bvaughn/react/wiki/Gatsby-check-list
21096d3 to
547f651
Compare
|
Picking this up for the moment. |
| // TODO: memoize to save doing O(n) on the active section items + subitems every | ||
| // time. | ||
| function findActiveItemTitle(location, defaultActiveSection) { | ||
| const {items} = defaultActiveSection; |
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 line causes errors for me.
yarn build fails with:
WebpackError: Cannot read property 'items' of null
yarn dev shows a runtime redbox with:
TypeError: Cannot read property 'items' of undefined
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.
Note that I happened to have this page open when running yarn dev:
http://localhost:8000/blog/2013/06/12/community-roundup.html
|
@joecritch I think you meant #10735 |
|
Done! |


what is the change?:
sticky bottom bar on small screen sizes
Let's either use this as a discussion starter or continue work on top of it. 🏗🙌
why make this change?:
Moving closer to Joe's fantastic design. :)
test plan:
Manual testing -
issue:
Various items under the
Sidebar Componenton this checklist;https://github.com/bvaughn/react/wiki/Gatsby-check-list