[Feature] Viva Git Log 分支面板改用公共树列表 desktop/internal/treelist
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
Línea de trabajo
Start in desktop/internal/workbench/gitlog_view.go with drawLogSection, drawLogNodes, drawLogRefRow and logTreeRow, which draw the branch panel by hand, and compare them with the treelist.List usage in filetree.go. The treelist package comes from the #1799 branch, so confirm it is available before starting. Done means the branch panel renders through treelist with stable row keys, keyboard navigation and double-click work, and the old logTreeRow path is removed.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem to solve / 要解决的问题
Viva 重构 PR #1799 已有公共折叠树列表 desktop/internal/treelist,项目树和 Git Log 提交详情的改动文件都用它绘制行、缩进、展开箭头、选择高亮,并处理方向键导航。Git Log 左侧的分支面板(本地分支、远端、标签)仍是另一套手写树:
drawLogSection、drawLogNodes、drawLogRefRow和logTreeRow递归声明行,自己计算缩进,自己画 12px 的箭头。- 行的标识是
logRefRows.At(*n),n是可见行序号,不是稳定键。展开或收起上方的分组后,同一个分支的标识会变,焦点和按下状态会跟着行号而不是分支走。 - 行的无障碍角色是
RoleButton,不报告Selected、Expandable、Expanded、Level;treelist的行报告这些属性。 - 面板没有键盘处理:
logRefRows只在声明行时出现,不能用方向键移动或展开收起。 - 选中行只有一种底色,不区分列表是否有键盘焦点;
treelist区分两种。
保留两套实现的代价:树的外观和交互在同一个窗口里不一致;以后修 treelist(例如多选、右键选择)时分支面板不会跟着改,需要再写一遍。
判定依据:在 #1799 分支上全仓库搜索 logTreeRow、drawLogNodes、logRefRows,只有 desktop/internal/workbench/gitlog_view.go 使用;treelist.List 的使用方是 filetree.go 和 gitlog_view.go 的改动文件列表。
Proposed solution / 建议方案
把分支面板改成 treelist.List:
- 为分组标题、文件夹和引用分配稳定键(例如按分组种类和 Core
ReferenceTreeNode.Path编号),每帧把可见行投影成[]treelist.Row。 - 引用行的图标、颜色和 ahead/behind 文字在
content回调里画;分组标题和文件夹用Branch/Expanded。 - 用
List.Key和List.DoubleClicked接入键盘和双击;Enter 在引用行上等同单击(切换日志查看的引用)。 - 搜索过滤后的平铺结果同样走
treelist,深度为 1。 - 删除
logTreeRow、drawLogNodes中被替代的部分和logIndent等只剩它使用的常量。
风险:分支面板的行高、缩进与当前不同,需要对照截图确认;键盘焦点要与提交列表、改动文件列表之间的切换保持一致。引用树结构仍由 Core git.referenceTree(#1753)提供,本项只改界面层。
Target platform / 目标平台
Cross-platform / 跨平台
Area / 模块
Git
Priority / 优先级
P2 / 后续考虑:目前不着急,可安排到后续版本
Alternatives considered / 已考虑的替代方案
只给 logTreeRow 补无障碍属性和键盘处理,改动更小,但仍然保留第二套树,以后 treelist 的改进需要重复实现。
Additional context / 补充信息
- 相关:#1794、#1799;项目树可见行下沉 Core 见 #1800。
treelist由 #1799 分支上“Git Log 改动文件文件夹折叠”和“项目树标题栏按钮”这次提交加入。- 这是静态代码核对,没有声称发生了运行时故障。
Checklist / 提交前检查
- I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复建议。
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.8k
- Forks
- 151
- Merge medio
- 9 h 32 min
- PR fusionados (30 d)
- 406
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de 1lck/Lithe-IDEA
-
review: high
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
1lck/Lithe-IDEA#1797 ·
Los mantenedores suelen responder en 1 día
-
area:other bug P2 platform:other review: high
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
1lck/Lithe-IDEA#1789 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
review: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
1lck/Lithe-IDEA#1670 ·
Los mantenedores suelen responder en 1 día
-
area:editor bug P0 platform:macos review: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
1lck/Lithe-IDEA#1118 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
review: high
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
1lck/Lithe-IDEA#1816 ·
Los mantenedores suelen responder en 1 día
Todos los issues de 1lck/Lithe-IDEA
Issues similares
-
Bug: Cloudflare Pages static _redirects identity rule causes RSC Flight to reload as HTMLPosiblemente ocupada @Donvero la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Mantitup-Org/vista#210 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
simstudioai/sim#9831 ·
Los mantenedores suelen responder en 1 día
-
status: waiting for maintainer
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
mui/material-ui#49751 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
diplodoc-platform/transform#1184 ·
Los mantenedores suelen responder en 1 día