实现局部页面加载优化,消除导航切换时的白屏闪烁 Implement partial page loading to eliminate white flash on navigation#43
Open
lanpartis wants to merge 2 commits intoTianyiDataScience:mainfrom
Open
实现局部页面加载优化,消除导航切换时的白屏闪烁 Implement partial page loading to eliminate white flash on navigation#43lanpartis wants to merge 2 commits intoTianyiDataScience:mainfrom
lanpartis wants to merge 2 commits intoTianyiDataScience:mainfrom
Conversation
Implement partial page loading to eliminate white flash on navigation 更改内容 / Changes: - 添加CSS过渡效果,为中间栏和右侧栏添加淡入淡出动画 Add CSS transitions for fade in/out animations on main panel and sidebar - 修改现有点击监听器,跳过导航链接让新逻辑处理 Modify existing click listener to skip nav-links for new handler - 添加局部导航逻辑:拦截导航点击,用fetch获取新页面,只更新中间栏和右侧栏内容 Add partial navigation: intercept nav clicks, fetch new page, update only main and sidebar - 同步导航链接的激活状态到当前页面 Sync navigation link active state to current page - 处理浏览器后退/前进按钮 Handle browser back/forward buttons 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix avatars not rendering after partial navigation 更改内容 / Changes: - 添加 initAvatars 函数,用于初始化新的头像元素 Add initAvatars function to initialize new avatar elements - 监听 partial-navigation-complete 事件,重新扫描并渲染新页面中的头像 Listen for partial-navigation-complete event to scan and render avatars in new content - 新头像添加后立即渲染一帧,确保即时显示 Render new avatars immediately after adding to ensure instant display 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Owner
|
谢谢你做这条 PR,也谢谢你把白屏闪一下这个体验问题认真拿出来解决。方向我认同。 这次我先没有直接 merge,主要是因为它现在把 如果你愿意继续推,我很建议下一版:
这条不是方向不行,而是我想把合入风险压低一点。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
之前切换tab有点闪眼睛,这个PR是为了避免重新渲染页面
更改内容 / Changes:
效果


修改前:
https://github.com/user-attachments/assets/b9a196d4-3a76-4e2a-8bb7-1164f9702300
更新后:
https://github.com/user-attachments/assets/3ef95fcf-9683-4eb3-b646-1dd1afb7862f