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

Expand sidebar element based on pathname #3567

Merged

Conversation

ivarnakken
Copy link
Member

Description

You can now visit any page and the correct category will be expanded.

This is done by using the url pathname to determine which category we're currently in, instead of it being passed down as prop.

Result

Screen.Recording.2023-02-13.at.21.55.27.mov

Testing

  • I have thoroughly tested my changes.

Tested for "info-om-abakus" (which is an edge case), and for when you're not logged in.

You can now visit any page and the correct category will be expanded.

This is done by using the url pathname to determine which category
we're currently in, instead of it being passed down as prop.
@ivarnakken ivarnakken added review-needed Pull requests that need review bug-fix Pull requests that fix a bug labels Feb 13, 2023
@ivarnakken ivarnakken requested review from mattiastofte and a team February 13, 2023 20:58
@ivarnakken ivarnakken self-assigned this Feb 13, 2023
@linear
Copy link

linear bot commented Feb 13, 2023

ABA-277 Sidebar elements should expand based on url path

As an example; if you visit https://abakus.no/pages/komiteer/11, it won't expand the "Komiteer" element, event though it should.

Copy link
Member

@eikhr eikhr left a comment

Choose a reason for hiding this comment

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

Cool

@eikhr eikhr added approved Pull requests that have been approved and removed review-needed Pull requests that need review labels Feb 13, 2023
Copy link
Contributor

@erlingfn erlingfn left a comment

Choose a reason for hiding this comment

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

LGTM

@erlingfn erlingfn merged commit d1a0041 into master Feb 14, 2023
@erlingfn erlingfn deleted the ivarnakken/aba-277-sidebar-elements-should-expand-based-on branch February 14, 2023 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Pull requests that have been approved bug-fix Pull requests that fix a bug
Projects
None yet
3 participants