fix(remote-dev): fix vertical text wrapping and clipping in resource tooltip (#6618)

A truncated element with a long data-tooltip put that text in the tooltip's shortcut slot (nowrap, keys font), which overflowed the bubble and crushed the main text to one character per line, as on the Remote Host Resources status item. The tooltip now shows such text as a wrapping note separate from the shortcut and honours data-no-tooltip up to the tooltip owner. The remote status items opt out of the redundant ellipsis tooltip and ellipsize their labels, and the breadcrumbs yield space first in the status bar.

Co-authored-by: dengliu <[email protected]>
Цей коміт міститься в:
Deng Liuтаdengliu authored and GitHub committed 2026-11-28 20:29:29 +08:00
1 джерело 4c01ce4443
коміт 68abd00a7f
9 files changed
+92 -10

No files matched your search

+6
Переглянути файл
@@ -88,5 +88,11 @@
display: inline-flex;
align-items: center;
gap: var(--space-1);
min-width: 0;
color: var(--warning);
}
.statusLabel {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
+3
Переглянути файл
@@ -48,6 +48,9 @@
}
.pillText {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
font-size: var(--fs-small);
}
+1
Переглянути файл
@@ -120,6 +120,7 @@ export function RemoteResources() {
pressure.level === "warn" && styles.levelWarn,
pressure.level === "danger" && styles.levelDanger,
)}
data-no-tooltip=""
aria-haspopup="dialog"
aria-expanded={open}
aria-label={tx`Remote host resources: ${tooltip}`}
+4 -2
Переглянути файл
@@ -27,6 +27,7 @@ export function RemoteStatus() {
if (lost)
return (
<BarButton
data-no-tooltip=""
tooltip={
reconnecting
? tx`Reconnecting to ${session.host}…`
@@ -40,12 +41,13 @@ export function RemoteStatus() {
>
<span className={styles.lost}>
{reconnecting ? <Spinner size={10} /> : <Icon name="warning" size={13} />}
{label}
<span className={styles.statusLabel}>{label}</span>
</span>
</BarButton>
);
return (
<BarButton
data-no-tooltip=""
tooltip={tx`Project runs on ${label}`}
aria-label={label}
onClick={() => void executeAction("remote.connect")}
@@ -62,7 +64,7 @@ export function RemoteStatus() {
}}
>
<Icon name="remote" size={13} />
{label}
<span className={styles.statusLabel}>{label}</span>
</BarButton>
);
}