[UX] Port file tree sidebar and keyboard shortcuts from Gitea (#1) #2
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/1-port-gitea-ux"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
/tree-listAPI)data-shortcut-keys) for input focus with Escape to clearChanges
ViewFileTree.vue,ViewFileTreeItem.vue,repo-view-file-tree.ts— file tree sidebar for code viewview_file_tree.tmpl,view_file_tree_toggle_button.tmpl— Go templates for sidebar mount point and toggleview_file.tmpl— flex layout with sidebar + contentshortcut.ts,shortcut.css— global keyboard shortcut systemcommon-global.js,repo-code.ts,find/files.tmpl— wire features into existing pageskeyboard-shortcut.tmpl— dev test pageshow_file_tree,hide_file_tree(en-US, ar, nb_NO)Test Results
Review: CHANGES_REQUESTED
1. Dead/fragile CSS —
shortcut.css:5-18Bare
kbdrule conflicts withbase.csskbd rule (loaded earlier). Kill the bare rule, move all styling into.global-shortcut-wrapper > kbd.2. Hardcoded English —
ViewFileTree.vue:136"Loading..."needs i18n viawindow.config.i18n.3. No test coverage
4 new TS modules + 2 Vue components with zero tests. Add Vitest tests for:
fileTreecomputed,fileLink,initGlobalShortcut.4. Unencoded branch name —
ViewFileTreeItem.vue:32branchNameSubURLpassed unencoded into URL. Applysplit("/").map(encodeURIComponent).join("/")like file paths.