-
Notifications
You must be signed in to change notification settings - Fork 129
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
Sidenav items do not (always) show active when they should, using cleanUrls: false #1248
Labels
bug
Something isn’t working
Comments
The fact that it’s not applied consistently suggests that in build it is a browser caching issue, not a Framework bug. But we should fix preview for sure. |
Fil
added a commit
that referenced
this issue
Apr 16, 2024
mbostock
added a commit
that referenced
this issue
Apr 16, 2024
* normalize page paths in preview closes #1248 * comment; normalize earlier --------- Co-authored-by: Mike Bostock <mbostock@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There seem to be two issues but I assume they are related.
1. Sidenav items do not show correct active state when running from the dev server, when
cleanUrls: false
configuration is usedTo reproduce, set
cleanUrls: false
in configuration, then run the dev server. Notice the sidenav items never show the correct active state.I tried to fix this myself, in render.ts:
It seemed to work running from the dev server, but unfortunately when I build the project (
yarn docs:build
) and serve the resulting dist files, it doesn't work.2. Some sidenav items do not show correct active state when running the built files, when
cleanUrls: false
configuration is usedWhen I removed my local changes and ran
docs:build
, with no changes other than the config entrycleanUrls: false
, I found that the correct active state does seem to be applied for most nav items - but not all of them! For example, /javascript.html seems rendered properly:Whereas /reactivity.html is not:
The text was updated successfully, but these errors were encountered: