feat(project-view): option to turn off horizontal scrolling

With long names or deep nesting the whole Project view scrolled sideways and
cut file names on the left. The view options get Horizontal Scrolling (on by
default, as IDEA scrolls); off clips long rows like the other trees, with the
full path in the row tooltip.
Цей коміт міститься в:
l0ng-ai committed 2026-11-19 17:44:40 +08:00
1 джерело e335e8bcf6
коміт bb118e3159
5 files changed
+10 -4

No files matched your search

+2 -1
Переглянути файл
@@ -44,6 +44,7 @@ export const OPTION_LABELS: Array<[ToggleOption, string]> = [
["showExcluded", "Show Excluded Files"],
["showMembers", "Show Members"],
["showRootPaths", "Show Root Paths"],
["horizontalScroll", "Horizontal Scrolling"],
["compact", "Compact Middle Packages"],
["foldersFirst", "Sort Folders First"],
["autoscrollFromSource", "Always Select Opened File"],
@@ -54,7 +55,7 @@ export const OPTION_LABELS: Array<[ToggleOption, string]> = [
];
/** The first entries of OPTION_LABELS are Appearance options, the rest Behavior. */
const APPEARANCE_OPTIONS = 6;
const APPEARANCE_OPTIONS = 7;
/** Header controls of the Project tool window (IDEA: Locate, Expand/Collapse All). */
export function ProjectHeaderActions() {
+1 -1
Переглянути файл
@@ -907,7 +907,7 @@ export function ProjectView() {
</div>
)}
<Tree<ProjectNode>
horizontalScroll
horizontalScroll={options.horizontalScroll}
aria-label="Project"
focusContext="projectViewFocus"
handleRef={setTreeHandle}
+3
Переглянути файл
@@ -63,6 +63,8 @@ export interface ViewOptions extends TreeOptions {
showMembers: boolean;
/** Show the location of each project root beside its name. */
showRootPaths: boolean;
/** Rows wider than the pane scroll sideways; off clips long names (VS Code's horizontal scrolling). */
horizontalScroll: boolean;
}
export const DEFAULT_VIEW_OPTIONS: ViewOptions = {
@@ -75,6 +77,7 @@ export const DEFAULT_VIEW_OPTIONS: ViewOptions = {
previewTab: false,
showMembers: false,
showRootPaths: true,
horizontalScroll: true,
};
function storedOptions(): ViewOptions {
+2 -1
Переглянути файл
@@ -2632,5 +2632,6 @@
"Updated {n} branch": "Updated {n} branch",
"Updated {n} branches": "Updated {n} branches",
"No branches were updated": "No branches were updated",
"Selected branches are up-to-date": "Selected branches are up-to-date"
"Selected branches are up-to-date": "Selected branches are up-to-date",
"Horizontal Scrolling": "Horizontal Scrolling"
}
+2 -1
Переглянути файл
@@ -9011,5 +9011,6 @@
"Updated {n} branch": "已更新 {n} 个分支",
"Updated {n} branches": "已更新 {n} 个分支",
"No branches were updated": "没有分支被更新",
"Selected branches are up-to-date": "所选分支都是最新的"
"Selected branches are up-to-date": "所选分支都是最新的",
"Horizontal Scrolling": "横向滚动"
}