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

refactor: move active url check logic to a method #29

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

beholdr
Copy link
Contributor

@beholdr beholdr commented Sep 17, 2024

Currently menu item marked as active even when it’s not equal, but has common prefix. Like /about and /about/something. But often it’s useful to strictly check for URL activity when both items are in the menu.

There is a discussion with solution for this case: #20 but it requires copying of ActiveUrlChecker class.

This PR moves checking logic of the ActiveUrlChecker to a separate method for easier extending of this class. It’s a simple change that will not affect current work.

@riasvdv riasvdv merged commit a136a10 into spatie:main Sep 20, 2024
8 checks passed
@riasvdv
Copy link
Member

riasvdv commented Sep 20, 2024

Thanks!

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.

2 participants