Skip to content

Detect usage of pinned nav item and handle section expanded state

Thomas Hutterer requested to merge 421011-remember-pinned-navs into master

What does this MR do and why?

Detect usage of pinned nav item and handle section expanded state

If a pinned nav item was used, the Pinned section will show as expanded and the item's original section shows as collapsed.

If an item was clicked in its original section, this section shows as expanded. As before, the pinned section still can show as expanded because we remember its state seperately in a cookie.

Closes #421011 (closed).


Also, the active nav item now is scrolled into the center of the visible sidebar, instead of bottom. This helps with items at the bottom to not be overlapped by the scroll scrim.

Screenshots or screen recordings

Before After
recording_1705936991 recording_1705936831

How to set up and validate locally

  • In any project or group, pin a few nav items. Example: "Plan/Issues".
  • Now collapse the Pinned section (to make sure its state is not stored as expanded in a cookie from earlier)
  • Click a pinned nav item ("Issues"). After the new page has loaded, the Pinned sections should show as expanded. The "Plan" section should show as collapsed.
  • Now click the same nav item, but in its original section ("Plan"). After page load, the Pinned section should stay closed, the "Plan" should show as expanded.
Edited by Austin Regnery

Merge request reports