-
Notifications
You must be signed in to change notification settings - Fork 22
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
fix(#1368,#1792,#1772,#1569): fixing link active when router change #1843
Conversation
Finished testing, here are my issues I found
|
Hi @ArakTaiRoth , The second one, as we discussed in Slack, will not be able to be solved using the current logic to detect the URL changed. |
libs/web-components/src/components/app-header-menu/AppHeaderMenu.svelte
Outdated
Show resolved
Hide resolved
libs/web-components/src/components/app-header-menu/app-header-menu.spec.ts
Outdated
Show resolved
Hide resolved
issue #1386 is verified fixed on react and angular, tested for both href and routerlink, also tested /start-up and /start-up/overview combination. works as expected |
e84ce2d
to
4561535
Compare
issue is verified on react and angular for chrome, firefox and edge |
issue is verified on react and angular for chrome, firefox and edge |
libs/web-components/src/components/app-header-menu/AppHeaderMenu.svelte
Outdated
Show resolved
Hide resolved
libs/web-components/src/components/app-header-menu/AppHeaderMenu.svelte
Outdated
Show resolved
Hide resolved
libs/web-components/src/components/app-header/AppHeader.spec.ts
Outdated
Show resolved
Hide resolved
libs/web-components/src/components/app-header/AppHeader.spec.ts
Outdated
Show resolved
Hide resolved
libs/web-components/src/components/app-header/AppHeader.spec.ts
Outdated
Show resolved
Hide resolved
8f68534
to
e1036a0
Compare
libs/web-components/src/components/app-header-menu/AppHeaderMenu.svelte
Outdated
Show resolved
Hide resolved
…there is sub item
🎉 This PR is included in version 1.17.0-alpha.56 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 4.17.0-alpha.28 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.21.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 4.21.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Scope:
What are changed:
components.css
to component itself, using::slottted
getMatchedLink
to make sure if AppHeader and AppHeaderMenu links have the same weight, then no menu should be active. Change the logic to make sure the highest weight item will be active. Add tests.current
should be updated. The current link should be correct.href
is fixed in order to work with Angular.Demo link: https://vanessatran-ddi.github.io/ui-components/#/
Video demo:
app-header-active.mov
app-header-active-web-docs.mov