Skip to content

Status bar: stay on one line and cut a long data folder path - #123

Merged
A21-devs merged 1 commit into
mainfrom
fix/status-bar-nowrap
Dec 1, 2026
Merged

A21-devs merged 1 commit into
mainfrom
fix/status-bar-nowrap

Conversation

@A21-devs

@A21-devs A21-devs commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Closes #113

The status bar is a 24 px flex row with no nowrap, so with a long data folder at the 900 px minimum width the items wrapped onto a second line and the bottom half was cut off.

  • .statusbar gets white-space: nowrap; overflow: hidden, its items are flex: none.
  • The data folder button is the only thing that shrinks (flex: 0 1 auto; min-width: 0). The path is in its own .sb-path span with text-overflow: ellipsis, because a bare text node inside an inline-flex button can't take an ellipsis.
  • The full path is still the tooltip. The button now has aria-label="Open data folder <path>", before a screen reader only heard the path.

Testing

  • npm run typecheck, npm run build
  • Rendered the status bar markup with the new styles.css in headless Edge at 900 px with a 70-character path: one line, the path ends in an ellipsis, everything else is at full size.

@A21-devs A21-devs added the ui label Dec 1, 2026
The bar had no nowrap and nothing that could shrink, so at the 900 px
minimum width a long data folder wrapped onto a second line and got
clipped. Items keep their size now, and only the path shrinks with an
ellipsis. The full path is still in the tooltip, and the button gets an
accessible name that says what it does.
@A21-devs

A21-devs commented Dec 1, 2026

Copy link
Copy Markdown
Owner Author

Keeping the end ellipsis. A middle cut needs a resize observer and text measuring for one label, and the tooltip already shows the whole path. CI is green.

@A21-devs
A21-devs merged commit 67ecdeb into main Dec 1, 2026
1 check passed
@A21-devs
A21-devs deleted the fix/status-bar-nowrap branch December 1, 2026 15:28

@A21-devs A21-devs left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CSS-only fix plus one span, does what the issue asks. .statusbar > .spacer keeps flex: 1 because it comes after the > * rule and is more specific, and the button's flex: 0 1 auto wins the same way.

.statusbar > .sb-link { flex: 0 1 auto; min-width: 0; }
.sb-link svg { flex: none; }
/* the full path is in the tooltip */
.sb-path { overflow: hidden; text-overflow: ellipsis; }

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: an end ellipsis hides the most specific part of a path (a long D: path loses its last folder). A middle ellipsis would read better, but it needs measuring in JS, and the tooltip has the full path. Fine for now.

@A21-devs A21-devs mentioned this pull request Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Status bar wraps and clips with a long data folder path

1 participant