[ROLLBACK] feat(console): 重构统计面板为标签页布局 (#145)#147
Merged
Conversation
- 新增功能: 引入 TabbedContent 组件将原有垂直堆叠的统计信息拆分为独立标签页 * 添加 `TabbedContent` 和 `TabPane` 导入,创建 "Overview", "Session", "Tools", "Sessions" 四个标签 * 将原有的 `mount(Static)`、`mount(Label)` 和 `mount(DataTable)` 调用迁移至对应的 `TabPane` 实例中 * 在 `_build_content` 末尾统一挂载包含所有分区的 `TabbedContent` 容器 - 修复问题: 优化页面重建时的用户交互体验 * 在 `on_mount` 或重建逻辑前保存当前激活的标签页状态 (`tc.active`) * 内容重建完成后尝试恢复之前选中的标签页索引,防止切换后焦点丢失 - 重构优化: 调整样式定义与代码结构 * 新增针对 `StatsTab TabbedContent` 和 `StatsTab TabPane` 的 CSS 样式,设置高度为 `1fr` 并启用 `overflow-y: auto` * 更新注释标识从 "Section" 改为 "Tab",明确各部分对应独立的标签页
Owner
Author
中文本 PR 对应的分支及以下提交存在严重 Bug,不可使用:
此 PR 已关闭,请勿基于上述提交继续开发或合并。 请勿使用这些提交。 EnglishThe branch associated with this PR and the following commits contain critical bugs and must NOT be used:
This PR is already closed. Please do not base any work on or merge the above commits. These commits are unusable. |
Owner
Author
|
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.
TabbedContent和TabPane导入,创建 "Overview", "Session", "Tools", "Sessions" 四个标签mount(Static)、mount(Label)和mount(DataTable)调用迁移至对应的TabPane实例中_build_content末尾统一挂载包含所有分区的TabbedContent容器on_mount或重建逻辑前保存当前激活的标签页状态 (tc.active)StatsTab TabbedContent和StatsTab TabPane的 CSS 样式,设置高度为1fr并启用overflow-y: auto