Fix sidebar scrolling issues and enhance guide interactions - #27
Merged
Conversation
- 统一侧边标签渲染与点击的固定父标签视口计算 - 展开或收拢章节后保持当前章节可见,避免侧边栏滚动锁死 - 侧边栏跳转保留滚动与折叠状态,不再因点击章节而上下滑动 - 修复固定父标签占用行时最后一个标签无法显示的问题
- 首行滚到章节标题时沿用上一行所属大章 - 子节进入首行后才切换顶部大章 - 避免滚轮滚动一格造成两次内容跳变
- 左键点击大章时切换展开收起状态 - 同时打开该章的index内容 - 更新侧边栏tooltip交互提示
- 移除水平排列时按可用宽度等比缩小子组件的逻辑 - 子组件保持自然尺寸,一行放不下时自动换行绘制 - 高度计算与鼠标命中测试同步适配换行布局
- 内容区滚轮滚动手持加速键时以 3 倍速度滚动 - 侧边栏标签 tooltip 新增滚动加速操作提示 - 折叠提示文本应用灰色弱化样式
- 在 Tooltip 中保留 ItemStack,使物品 tooltip 走带物品栈的渲染重载 - 由 RenderTooltipEvent 统一注入 W 键提示,移除配方和方块组件重复的手动提示 - 保留 W 键跳转所需的 hoveredDocLink 记录
- 悬停投影结构按钮时显示双行快捷键提示 - 为MDRenderContext增加多行tooltip支持 - 补充中英文案并重新生成英文语言文件
PigeonNian
approved these changes
Aug 4, 2026
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.
本次拉取请求对指南UI、工具提示处理以及水平行布局渲染进行了多项改进。其中最重要的改动包括:增强在指南间导航时UI状态的保持能力,重构工具提示数据结构以更好地支持物品工具提示,以及重新设计水平行布局以支持自动换行而非缩放组件。此外,还对配方和方块渲染逻辑进行了小幅改进和清理。
指南UI改进:
openGuideOnClientPreservingLabelState并重构指南打开逻辑,使其可选择继承标签状态来实现。[1] [2] [3] [4] [5] [6]工具提示处理改进:
MDRenderContext.Tooltip记录,使其始终存储关联的ItemStack,从而支持更灵活的工具提示渲染,并更新了工具提示渲染逻辑以使用该信息。[1] [2]水平行布局重新设计:
MDRowComponent),采用自然尺寸、自动换行的算法,不再缩放组件以适配一行。这改善了当一行内容过多时的可读性和可用性。[1] [2] [3] [4]其他UI/UX改进:
MDNBTStructureComponent中,当鼠标悬停在结构按钮上时,为结构投影控制添加了快捷键工具提示。构建配置: