Add shared controls for multi-file diff views

- Introduce UIMultiDiffView as a first-class container for multi-file diffs, with a compact toolbar for expanding or collapsing all files, switching between unified and split views, and displaying aggregate file and line-change statistics.
	- Calculate addition and removal totals during diff preparation so asynchronously prepared diffs do not need to rescan their contents on the UI thread. Cache the child diff views and expose the multi-diff state through the new component.
	- Use UIMultiDiffView for regular diff tabs and Git commit details, removing the duplicated commit-specific toolbar, styling logic, tokenizer state, and view-mode handling. Preserve the original Git commit toolbar appearance, spacing, icons, tooltips, and colored changed-files summary.
	- Keep the existing UIDiffView multi-file factory available for compatibility and add regression coverage for aggregate statistics, toolbar visibility, unified/split propagation, collapse state, prepared diffs, and large patches.
	- Add localized changed-files summaries to all ecode translation catalogs.
	- Fix the secondary-window UI test to use the appropriate std::string assertion helper.
This commit is contained in:
Martín Lucas Golini
2026-09-10 23:15:46 -03:00
parent 095fe7919e
commit 3effffd16f
11 changed files with 318 additions and 137 deletions
+1
View File
@@ -1292,6 +1292,7 @@ Für sichtbare Änderung ecode neu starten.</string>
<string name="git_history_no_additional_commits">Keine weiteren Commits</string>
<string name="git_show_in_history">Im Git-Verlauf anzeigen</string>
<string name="git_commit_history_title">Git-Commit-Verlauf – %s</string>
<string name="git_changed_files_summary">Geänderte Dateien (%zu) +%zu -%zu</string>
<string name="git_commit_sha">Commit-SHA</string>
<string name="git_copy_commit_sha">Commit-SHA kopieren&#10;%s</string>
<string name="git_switch_to_split_diff">Zur geteilten Diff-Ansicht wechseln</string>
+1
View File
@@ -1277,6 +1277,7 @@ Restart ecode to see the changes.</string>
<string name="git_history_no_additional_commits">No additional commits</string>
<string name="git_show_in_history">Show in Git History</string>
<string name="git_commit_history_title">Git Commit History - %s</string>
<string name="git_changed_files_summary">Changed files (%zu) +%zu -%zu</string>
<string name="git_commit_sha">Commit SHA</string>
<string name="git_copy_commit_sha">Copy Commit SHA&#10;%s</string>
<string name="git_switch_to_split_diff">Switch to split diff view</string>
+1
View File
@@ -1276,6 +1276,7 @@ Redémarrer ecode pour voir les changements.</string>
<string name="git_history_no_additional_commits">Aucun commit supplémentaire</string>
<string name="git_show_in_history">Afficher dans l’historique Git</string>
<string name="git_commit_history_title">Historique des commits Git – %s</string>
<string name="git_changed_files_summary">Fichiers modifiés (%zu) +%zu -%zu</string>
<string name="git_commit_sha">SHA du commit</string>
<string name="git_copy_commit_sha">Copier le SHA du commit&#10;%s</string>
<string name="git_switch_to_split_diff">Passer à la vue des différences séparée</string>
+1
View File
@@ -1081,6 +1081,7 @@ file in the directory tree.</string>
<string name="git_history_no_additional_commits">没有其他提交</string>
<string name="git_show_in_history">在 Git 历史记录中显示</string>
<string name="git_commit_history_title">Git 提交历史记录 - %s</string>
<string name="git_changed_files_summary">已更改文件(%zu) +%zu -%zu</string>
<string name="git_commit_sha">提交 SHA</string>
<string name="git_copy_commit_sha">复制提交 SHA&#10;%s</string>
<string name="git_switch_to_split_diff">切换到拆分差异视图</string>