Skip to content
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

Make clicking title in docs behave like toggle button #8028

Closed

Conversation

kkemple
Copy link
Contributor

@kkemple kkemple commented Sep 10, 2018

This PR makes the behavior between clicking a title and the accompanying button the same.

Closes #7975

@@ -235,7 +235,7 @@ class SidebarBody extends Component {
key={index}
level={0}
location={location}
onLinkClick={closeSidebar}
Copy link
Contributor

@fk fk Sep 10, 2018

Choose a reason for hiding this comment

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

Ah, closeSidebar! That of course made a lot more sense in the context of Gatsby v1. All the sidebar stuff started as #6076 against www on v1 (and mostly borrowing the reactjs.org sidebar implementation 🙏), where the sidebars were part of the layout, and never got removed from the DOM when switching location.

IMO closeSidebar does still make sense for Gatsby v2 www for mobile and the anchor links in the Tutorial (https://next.gatsbyjs.org/tutorial/part-zero/#overview-of-core-technologies) …having a hard time putting thoughts into words, long day…lemme record a video! 😄

OK, here's the one good thing closeSidebar is still doing and IMO is worth preserving:
https://www.dropbox.com/s/yj6dl1wx788vpwm/closeSidebar.mov?dl=0

@KyleAMathews KyleAMathews force-pushed the master branch 5 times, most recently from fc4ca3e to 2116fff Compare September 17, 2018 20:36
@LekoArts
Copy link
Contributor

LekoArts commented Dec 4, 2018

@kkemple @fk What's the status here? 😊

@fk
Copy link
Contributor

fk commented Dec 4, 2018

@LekoArts 🤗
Good question…"forgotten" is the status I guess! 😅

IIRC my comment explains that while this PR does fix the connected issue, it does so at the expense of closeSidebar. IMO we should keep closing the sidebar when clicking a link.

@LekoArts
Copy link
Contributor

LekoArts commented Dec 12, 2018

@fk So could we close this PR then? Or what's the plan?

@calcsam
Copy link
Contributor

calcsam commented Jan 25, 2019

Let's close this as it's stale and merge conflicts.

@fk you can re-open if we want to do something like this later.

@calcsam calcsam closed this Jan 25, 2019
@MichaelDeBoey MichaelDeBoey deleted the topics/inconsistent-accordian-behavior-docs-sidebar branch January 20, 2020 18:15
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] Inconsistent accordion behavior in docs sidebar
4 participants