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

activate sidebar on resetEvents #2131

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

andy-held
Copy link

Summary

When no fetchis done, the active sidebar element is not updated when a link is clicked. This is changed in this commit by calling getAndActive in $resetEvents.

This is shown in the videos below. In both videos, the 'QuickStart' sidebar element was selected, then the 'Initialize' sub-sidebar child of 'Quickstart' and then the parent sidebar element, 'Quickstart' again.

Current behavior

Clicking on a sub-sidebar, then clicking on the parent sidebar again results in no element being 'active' .

Screencast.from.14.07.2023.17.51.07.webm

Behavior after fix

Clicking on a sub-sidebar, then clicking on the parent sidebar again results in the sidebar element being 'active' .

Screencast.from.14.07.2023.17.50.45.webm

What kind of change does this PR introduce?

Bugfix

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Related issue, if any:

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

When no `fetch`is done, the active sidebar element is not updated when
a link is clicked. This is changed in this commit by calling
getAndActive in `$resetEvents`.
@vercel
Copy link

vercel bot commented Jul 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docsify-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2023 4:03pm

Copy link
Member

@trusktr trusktr left a comment

Choose a reason for hiding this comment

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

Hmm, it is still funky that it unhighlights the top level item while scrolling (highlights the hidden child item).

Can you add a test for this?

Perhaps what we should do is highlight the parent items in lighter green, and the sub item in darker green, so that the whole path is highlighted.

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.

3 participants