-
Notifications
You must be signed in to change notification settings - Fork 10
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
website shelf menu gets stuck on a page where first nav item has sub headings #340
Comments
One thing I notice is that the shelf is always firing the I wonder if this is related to the multiple |
I have an explanation for why It has to do with the routing.
lit-element docs When I click the netlify route, the component is readded to the dom, which calls the connectedCallback again for the entire tree.
Entire thing is reloaded every single route change after we download the html file and hydrate the application. It's not checking state to see if the needed data already exists on client. |
Currently, we're set to query graphql on connectedCallback and instead it should be conditionally, in our case we really only need to fetch a new menu when the main category changes(docs -> getting-started, etc). We're also not managing the state correctly here as the query data is lost each time a route changes. |
Also noticing this bug, where if you go to a page and return, it's shelf items will not expand / collapse after an initial expand / collapse Steps
ExpectedUser could keep expanding / collapsing ActualSection no longer expands / collapses |
I can't replicate this, are you missing a step here? |
Created a video and posted to the Slack channel. I think it's mainly around the carrot's themselves, for some reaosn. |
Linking to #112 (comment) since this is more related to CSS / UX, and not any bug per se. |
Type of Change
Summary
If you go to the guides page right now, you will find that while the content displayed is that of the guides/index.md page, the shelf on the left is already auto-expanded to show the link heading children of the first shelf item.
However, clicking any of those links or the nav item itself does nothing. The only way to access the content is to click the downward facing carrot, which is not very intuitive.
Details
It is likely due to this logic, which auto expands the first selected item automatically, but I don't think it checks to see if it's on a top level / index.md route, e.g. /guides/ to know if it should expand or not.
This gets called during
onConnectedCallback
so will happen each time. This isn't an issue for other pages because so far the guides page is the only page that has linkHeadings for it's first shelf child.The text was updated successfully, but these errors were encountered: