дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 09:11:10 +02:00
fix(workbench): main toolbar, tool window stripe and status bar metrics (#7829)
Main toolbar items get a 10px pitch and the dropdowns 10/6px insets with a 16px chevron; stripe buttons get 5px padding on both sides; the status bar is 34px with 4px widget hover insets, its breadcrumbs lifted 5px, and the islands keep a 3px inset above it. Language Services moves after the caret position in the status bar. Compact mode keeps its previous metrics. Fixed-viewport e2e layouts (commit checks, project tree second click, main toolbar label compression next to the New Agent Task button) get room for the wider gaps and the taller status bar. Co-authored-by: wildcatDownstairs <[email protected]>
Цей коміт міститься в:
1 джерело
4f2d85007b
коміт
e666bb2e33
23 files changed
+115
-53
No files matched your search
@@ -399,6 +399,9 @@
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.statusCrumbs {
|
||||
margin-block-end: var(--statusbar-crumbs-lift);
|
||||
}
|
||||
.crumbStrip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -266,7 +266,7 @@ function CrumbNav({
|
||||
return (
|
||||
// oxlint-disable-next-line react/no-array-index-key -- the `…` crumb and the last directory crumb can share a title; position disambiguates them
|
||||
<Fragment key={`${i}:${s.title}`}>
|
||||
{i > 0 && <Icon name="chevron-right" size={12} className={styles.statusSep} />}
|
||||
{i > 0 && <Icon name="chevron-right" size={16} className={styles.statusSep} />}
|
||||
<BarButton
|
||||
className={styles.crumbButton}
|
||||
tooltip={s.title}
|
||||
@@ -354,7 +354,7 @@ export function Breadcrumbs({ className, inStatusBar = false }: { className?: st
|
||||
|
||||
/** The status bar instance of the navigation bar; renders only for `statusBar`. */
|
||||
export function StatusBarBreadcrumbs() {
|
||||
return <Breadcrumbs inStatusBar />;
|
||||
return <Breadcrumbs className={`${styles.status} ${styles.statusCrumbs}`} inStatusBar />;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -135,7 +135,8 @@ export function activate(): () => void {
|
||||
registerStatusItem({
|
||||
id: "code-insight.servers",
|
||||
align: "right",
|
||||
priority: 5,
|
||||
// IDEA: after Position, before LineSeparator.
|
||||
priority: 25,
|
||||
component: ServerStatus,
|
||||
title: "Language Services",
|
||||
}),
|
||||
|
||||
@@ -91,7 +91,7 @@ function Chooser({ active }: { active: string }) {
|
||||
<span className={styles.widgetName} data-toolbar-label="">
|
||||
{active}
|
||||
</span>
|
||||
<Icon name="chevron-down" size={14} className={styles.widgetChevron} />
|
||||
<Icon name="chevron-down" size={16} className={styles.widgetChevron} />
|
||||
</BarButton>
|
||||
<Menu
|
||||
open={open}
|
||||
|
||||
@@ -97,7 +97,7 @@ function Chooser({ root }: { root: string }) {
|
||||
<span className={styles.widgetName} data-toolbar-label="">
|
||||
{label}
|
||||
</span>
|
||||
<Icon name="chevron-down" size={14} className={styles.widgetChevron} />
|
||||
<Icon name="chevron-down" size={16} className={styles.widgetChevron} />
|
||||
</BarButton>
|
||||
<Menu
|
||||
open={chooserOpen}
|
||||
|
||||
@@ -99,7 +99,7 @@ function Chooser() {
|
||||
<span className={styles.widgetName} data-toolbar-label="">
|
||||
{busy && busy === current?.udid ? `${label}…` : label}
|
||||
</span>
|
||||
<Icon name="chevron-down" size={14} className={styles.widgetChevron} />
|
||||
<Icon name="chevron-down" size={16} className={styles.widgetChevron} />
|
||||
</BarButton>
|
||||
<Menu open={open} anchor={anchor} items={items} placement="bottom-end" onClose={() => setOpen(false)} />
|
||||
</>
|
||||
|
||||
@@ -379,7 +379,6 @@
|
||||
min-width: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-1);
|
||||
max-width: 260px;
|
||||
height: var(--h-toolbar-widget);
|
||||
border-radius: var(--radius-toolbar-dropdown);
|
||||
@@ -451,6 +450,7 @@
|
||||
flex: none;
|
||||
}
|
||||
.widgetChevron {
|
||||
margin-inline-start: calc(var(--toolbar-dropdown-chevron-gap) - var(--toolbar-dropdown-gap));
|
||||
color: var(--fg-subtle);
|
||||
flex: none;
|
||||
}
|
||||
@@ -458,7 +458,8 @@
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-0-5);
|
||||
/* Run, Debug and More keep the main toolbar's 40px button pitch (MainToolbar.Icon.insets 6,5,4,5). */
|
||||
gap: var(--toolbar-item-gap);
|
||||
}
|
||||
.widgetRun:not(:disabled) {
|
||||
color: var(--success);
|
||||
|
||||
@@ -94,7 +94,7 @@ export function RunWidget() {
|
||||
<span className={styles.widgetName} data-toolbar-label="">
|
||||
{selected ? label(selected) : tx(currentFile ? "Current File" : "Select Configuration")}
|
||||
</span>
|
||||
<Icon name="chevron-down" size={14} className={styles.widgetChevron} />
|
||||
<Icon name="chevron-down" size={16} className={styles.widgetChevron} />
|
||||
</BarButton>
|
||||
<span className={styles.widgetButtons}>
|
||||
{showLoading ? (
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
.widget {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-1);
|
||||
max-width: 280px;
|
||||
height: var(--h-toolbar-widget);
|
||||
border-radius: var(--radius-toolbar-dropdown);
|
||||
@@ -19,8 +18,9 @@
|
||||
flex: none;
|
||||
color: var(--fg-muted);
|
||||
}
|
||||
.chevron {
|
||||
.widgetChevron {
|
||||
flex: none;
|
||||
margin-inline-start: calc(var(--toolbar-dropdown-chevron-gap) - var(--toolbar-dropdown-gap));
|
||||
color: var(--fg-subtle);
|
||||
}
|
||||
.name {
|
||||
|
||||
@@ -181,7 +181,7 @@ export function BranchWidget({ place = "toolbar" }: { place?: BranchWidgetPlace
|
||||
)}
|
||||
{/* Like IDEA's widget: icons only; counts are in the tooltip. */}
|
||||
<BranchSync behind={branch.behind} ahead={ahead} unfetched={!!pending} showCounts={false} onSelect={openSync} />
|
||||
{toolbar && <Icon name="chevron-down" size={14} className={styles.chevron} />}
|
||||
{toolbar && <Icon name="chevron-down" size={16} className={styles.widgetChevron} />}
|
||||
</BarButton>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
.status[data-mode="replace"] {
|
||||
color: var(--warning);
|
||||
}
|
||||
/* Off, it reads "Vim" like any other text widget: no room kept for the mode names. */
|
||||
.off {
|
||||
min-width: 0;
|
||||
color: var(--fg-subtle);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
@@ -345,11 +345,24 @@ html[data-os="windows"] {
|
||||
/* Dialog window title bar (Settings): WebStorm's traffic lights centre 16px from the top. */
|
||||
--h-dialog-titlebar: 32px;
|
||||
--titlebar-tool-button: 30px;
|
||||
/* MainToolbar.Icon.insets 6,5,4,5 (Islands): 5 + 5 between toolbar items, and the
|
||||
buttons sit 1px below the bar's centre (top 6, bottom 4). */
|
||||
--toolbar-item-gap: 10px;
|
||||
--titlebar-pad-top: 2px;
|
||||
/* main toolbar dropdowns: project, VCS branch, run configuration */
|
||||
--h-toolbar-widget: 30px;
|
||||
/* MainToolbar.Dropdown.borderInsets 5,10,5,6; AbstractToolbarCombo.iconTextGap 6 and
|
||||
ToolbarComboButtonUI BEFORE_CHEVRON_GAP 2 before the 16px chevron. */
|
||||
--toolbar-dropdown-pad-start: 10px;
|
||||
--toolbar-dropdown-pad-end: 6px;
|
||||
--toolbar-dropdown-gap: var(--space-1-5);
|
||||
--toolbar-dropdown-chevron-gap: 2px;
|
||||
/* tool window stripe button, icons only */
|
||||
--stripe-icon-button: 30px;
|
||||
--stripe-outer-padding: 4px;
|
||||
/* StripeToolbar.Button.leftStripeIcon.padding 5,5,5,2: 5 to the window edge; on the island
|
||||
side 2 plus the island's own border inset (Island.borderWidth 6 / 2 = 3). */
|
||||
--stripe-outer-padding: 5px;
|
||||
--stripe-inner-padding: 5px;
|
||||
--h-header: 40px;
|
||||
/* JBUI.CurrentTheme.ToolWindow.defaultHeaderHeight(): 41, no Islands override. */
|
||||
--h-toolwindow-header: 41px;
|
||||
@@ -357,7 +370,13 @@ html[data-os="windows"] {
|
||||
--h-tab: 28px;
|
||||
--h-row: 24px;
|
||||
--h-list-row: 24px;
|
||||
--h-statusbar: 30px;
|
||||
/* WebStorm 2026.3 Islands with the navigation bar in the status bar: 34px, and the islands
|
||||
end 3px above it (Island.borderWidth 6 / 2), the same inset they keep below the toolbar. */
|
||||
--h-statusbar: 34px;
|
||||
/* Status bar breadcrumbs sit 2.5px above the bar's middle in WebStorm 2026.3; compact mode's
|
||||
StatusBar.Breadcrumbs.navBarInsets.compact 1,0,1,4 centres them. */
|
||||
--statusbar-crumbs-lift: 5px;
|
||||
--island-edge: 3px;
|
||||
--h-navigationbar: 26px;
|
||||
--h-field: 28px;
|
||||
--h-button: 28px;
|
||||
@@ -1599,7 +1618,12 @@ html[data-os="windows"] {
|
||||
--h-row: 22px;
|
||||
--h-list-row: 22px;
|
||||
--h-statusbar: 24px;
|
||||
--statusbar-crumbs-lift: 0px;
|
||||
--island-edge: 2px;
|
||||
--stripe-icon-button: 24px;
|
||||
--stripe-outer-padding: 4px;
|
||||
--stripe-inner-padding: 4px;
|
||||
--titlebar-pad-top: 0px;
|
||||
--h-field: 24px;
|
||||
--h-button: 24px;
|
||||
--fs-chrome: calc(var(--fs-ui) - 1px);
|
||||
|
||||
@@ -23,17 +23,20 @@
|
||||
}
|
||||
/* Status bar widget (StatusBar.Widget): UI font, secondary text, rounded hover. */
|
||||
.status {
|
||||
height: max(var(--h-statusbar) - 8px, var(--h-control-small));
|
||||
margin: 0 -2px;
|
||||
padding: 0 6px;
|
||||
/* StatusBar.Widget.hoverInsets 3,4,1,4: the hover is 4px shorter than the bar. */
|
||||
height: max(var(--h-statusbar) - 4px, var(--h-control-small));
|
||||
margin: 0;
|
||||
padding: 0 4px;
|
||||
color: var(--fg-secondary);
|
||||
font-size: var(--fs-chrome);
|
||||
}
|
||||
/* Main toolbar widget (project / VCS / run configuration). */
|
||||
/* Main toolbar widget (project / VCS / run configuration): MainToolbar.Dropdown.borderInsets
|
||||
and the combo's icon-text gap. */
|
||||
.title {
|
||||
gap: var(--toolbar-dropdown-gap);
|
||||
height: var(--h-toolbar-widget);
|
||||
margin: 0 -4px;
|
||||
padding: 0 8px;
|
||||
margin: 0;
|
||||
padding: 0 var(--toolbar-dropdown-pad-end) 0 var(--toolbar-dropdown-pad-start);
|
||||
border-radius: var(--radius-toolbar-dropdown);
|
||||
color: var(--fg-strong);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
/* StatusBar.Widget.widgetInsets 6,8 with hoverInsets 3,4,1,4: the hover fills all but 4px of
|
||||
each side, so the item keeps 4px and its button the other 4px around the text. */
|
||||
.item {
|
||||
flex: none;
|
||||
display: flex;
|
||||
|
||||
@@ -3,17 +3,18 @@
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-1);
|
||||
padding: 0 8px 0 10px;
|
||||
gap: var(--toolbar-item-gap);
|
||||
padding: var(--titlebar-pad-top) 8px 0 10px;
|
||||
white-space: nowrap;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
color: var(--fg-strong);
|
||||
font-size: var(--fs-chrome);
|
||||
}
|
||||
/* Room for the native macOS traffic lights, including in full screen (#4746). */
|
||||
/* Room for the native macOS traffic lights, including in full screen (#4746). WebStorm 2026.3's first
|
||||
toolbar widget starts 83px in, its project badge at 93px. */
|
||||
.overlay {
|
||||
padding-left: max(82px, calc(82px / var(--titlebar-zoom, 1)));
|
||||
padding-left: max(83px, calc(83px / var(--titlebar-zoom, 1)));
|
||||
/* Keep the gear on the icon-only right stripe's centre line, including compact mode. */
|
||||
padding-right: calc(var(--stripe-outer-padding) + (var(--stripe-icon-button) - var(--titlebar-tool-button)) / 2);
|
||||
}
|
||||
@@ -70,6 +71,10 @@
|
||||
gap: var(--space-1);
|
||||
min-width: 0;
|
||||
}
|
||||
/* A contribution that renders nothing takes no toolbar gap, as a hidden component in IDEA's toolbar. */
|
||||
.item:empty {
|
||||
display: none;
|
||||
}
|
||||
.bar > .widget,
|
||||
.item:has([data-toolbar-label]) {
|
||||
flex: none;
|
||||
@@ -78,19 +83,10 @@
|
||||
min-inline-size: 0;
|
||||
max-inline-size: min(var(--toolbar-label-width, 100vw), var(--toolbar-label-max, 100vw));
|
||||
}
|
||||
/* Main toolbar dropdown widgets. */
|
||||
/* Main toolbar dropdown widgets: BarButton's `title` variant gives the insets and gaps. */
|
||||
.widget {
|
||||
min-width: 0;
|
||||
height: var(--h-toolbar-widget);
|
||||
margin: 0;
|
||||
padding: 0 8px;
|
||||
border-radius: var(--radius-toolbar-dropdown);
|
||||
color: var(--fg-strong);
|
||||
font-size: var(--fs-chrome);
|
||||
}
|
||||
.widget {
|
||||
gap: var(--space-1-5);
|
||||
}
|
||||
.widget:hover,
|
||||
.widget[aria-expanded="true"] {
|
||||
background: var(--bg-toolbar-hover);
|
||||
@@ -102,6 +98,7 @@
|
||||
}
|
||||
.chevron {
|
||||
flex: none;
|
||||
margin-inline-start: calc(var(--toolbar-dropdown-chevron-gap) - var(--toolbar-dropdown-gap));
|
||||
color: var(--fg-muted);
|
||||
}
|
||||
.avatar {
|
||||
@@ -115,9 +112,10 @@
|
||||
background: linear-gradient(135deg, var(--project-color), var(--project-color-end));
|
||||
color: var(--fg-button-primary);
|
||||
--icon-color: currentColor;
|
||||
font-size: var(--fs-tiny);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.02em;
|
||||
/* WebStorm 2026.3 draws the initials in JetBrains Mono at the label size (cap height 9.5px). */
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--fs-ui);
|
||||
font-weight: 400;
|
||||
}
|
||||
/* IDEA compact: the avatar follows MainToolbar.Button.iconSize (20 → 16). */
|
||||
.avatar:has(> img) {
|
||||
@@ -126,7 +124,7 @@
|
||||
:global(:root[data-compact]) .avatar {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
font-size: 9px;
|
||||
font-size: 10px;
|
||||
}
|
||||
.drag {
|
||||
flex: 1;
|
||||
@@ -143,8 +141,7 @@
|
||||
.tools {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-1);
|
||||
margin-left: 12px;
|
||||
gap: var(--toolbar-item-gap);
|
||||
}
|
||||
.tool {
|
||||
width: var(--titlebar-tool-button);
|
||||
@@ -253,6 +250,8 @@
|
||||
flex: none;
|
||||
align-self: stretch;
|
||||
display: flex;
|
||||
/* Flush with the window's top edge, above the toolbar's top inset. */
|
||||
margin-top: calc(-1 * var(--titlebar-pad-top));
|
||||
margin-left: 8px;
|
||||
}
|
||||
.captionsLeft {
|
||||
|
||||
@@ -96,7 +96,7 @@ function ProjectButton() {
|
||||
<span className={styles.widgetText} data-toolbar-label="">
|
||||
{label}
|
||||
</span>
|
||||
<Icon name="chevron-down" size={12} className={styles.chevron} />
|
||||
<Icon name="chevron-down" size={16} className={styles.chevron} />
|
||||
</BarButton>
|
||||
{Popup ? (
|
||||
open && <Slot component={Popup} anchor={ref} onClose={() => setOpen(false)} />
|
||||
@@ -134,7 +134,7 @@ function VcsFallback() {
|
||||
<span className={styles.widgetText} data-toolbar-label="">
|
||||
<T>Version Control</T>
|
||||
</span>
|
||||
<Icon name="chevron-down" size={12} className={styles.chevron} />
|
||||
<Icon name="chevron-down" size={16} className={styles.chevron} />
|
||||
</BarButton>
|
||||
<Menu open={open} onClose={() => setOpen(false)} anchor={ref} items={items} aria-label="Version Control" />
|
||||
</>
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
/* Undocked tool windows are positioned against the grid. */
|
||||
position: relative;
|
||||
flex: 1;
|
||||
/* IDEA paints each island inside its bounds (Island.borderWidth / 2), so the editor and tool
|
||||
windows keep that gap below the main toolbar and above the status bar. */
|
||||
margin-block: var(--island-edge);
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
@@ -247,16 +250,17 @@
|
||||
--stripe-button: var(--stripe-drag, var(--stripe-icon-button));
|
||||
/* Outer padding: narrower than the island gap so the side frame stays close to the status bar's height, as in IDEA. */
|
||||
--stripe-pad: var(--stripe-outer-padding);
|
||||
width: calc(var(--stripe-button) + var(--stripe-pad) + var(--island-gap));
|
||||
width: calc(var(--stripe-button) + var(--stripe-pad) + var(--stripe-inner-padding));
|
||||
container-type: inline-size;
|
||||
flex: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
/* Icon buttons repeat at the title bar's height, so the title bar's Settings button reads as the right stripe's first one, as in IDEA. */
|
||||
/* Icon buttons repeat at the title bar's height, so the title bar's Settings button reads as the right stripe's first one, as in IDEA.
|
||||
The first button sits one pitch below the toolbar buttons, which keep --titlebar-pad-top above the bar's centre line. */
|
||||
--stripe-gap: calc(var(--h-titlebar) - var(--stripe-icon-button));
|
||||
gap: var(--stripe-gap);
|
||||
padding: calc(var(--stripe-gap) / 2) 0 6px;
|
||||
padding: calc((var(--stripe-gap) + var(--titlebar-pad-top)) / 2) 0 calc(var(--stripe-gap) / 2);
|
||||
/* Transparent: stripes sit on the window frame so the project-colour wash flows from the title bar. */
|
||||
background: transparent;
|
||||
/* Short windows: scroll the buttons instead of clipping the last ones. */
|
||||
@@ -274,10 +278,10 @@
|
||||
}
|
||||
.stripeSideLeft {
|
||||
padding-left: var(--stripe-pad);
|
||||
padding-right: var(--island-gap);
|
||||
padding-right: var(--stripe-inner-padding);
|
||||
}
|
||||
.stripeSideRight {
|
||||
padding-left: var(--island-gap);
|
||||
padding-left: var(--stripe-inner-padding);
|
||||
padding-right: var(--stripe-pad);
|
||||
}
|
||||
/* Drag the stripe's inner edge: wider shows names, narrow shows icons only. Hit area covers the stripe's gap. */
|
||||
|
||||
Reference in new issue
Заблокувати користувача