-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 the sidebar title of beyond the current window that it follows the title of the article in the current window #2272
base: master
Are you sure you want to change the base?
Conversation
After the title of the sidebar exceeds the current window, it does not automatically follow the document title to display in the current window. See my blog post for the effect, try sliding your mouse: https://zpj80231.github.io/znote/views/java/ThreadLocal.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! But I think you may want to move your changes to @vuepress/plugin-active-header-links
And there are some unexpected behaviors I found. Try to visit deploy-preview, the document won't scroll to the correct position. And when scroll to the bottom of Config Reference, the sidebar do scroll with the content, but try to scroll back to the top.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed several issues:
- Fix full path jump to correct navigation and page.
- When the sidebar title is not in the current window, the sidebar title automatically scrolls down with the content.
- When the sidebar title is not in the current window, the sidebar title automatically scrolls up with the content
Try to visit https://zpj80231.gitee.io/znote/views/java/ThreadLocal.html#简介.
I tried to move the change to @vuepress/plugin-active-header-links, but found it didn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the code and changed something to @ vuepress / plugin-active-header-links.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix content jump
@ludanxer I think all problems have been solved, please visit the latest deploy-preview. |
good!!! |
After the title of the sidebar exceeds the current window, it does not automatically follow the document title to display in the current window.
See my blog post for the effect, try sliding your mouse: https://zpj80231.github.io/znote/views/java/ThreadLocal.html
Summary
What kind of change does this PR introduce? (check at least one)
If changing the UI of default theme, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
fix #xxx[,#xxx]
, where "xxx" is the issue number)You have tested in the following browsers: (Providing a detailed version will be better.)
If adding a new feature, the PR's description includes:
To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.
Other information: