Skip to content

fix(web): size key drawer to the value's longest line - #172

Merged
umputun merged 2 commits into
masterfrom
wider-drawer
Dec 6, 2026
Merged

umputun merged 2 commits into
masterfrom
wider-drawer

Conversation

@umputun

@umputun umputun commented Dec 6, 2026

Copy link
Copy Markdown
Owner

The 640px desktop drawer wrapped long JSON values mid-line, which made them hard to read.

The server now estimates the value's longest line (valueCols template func, tabs to 8-column stops) and passes it to the view, edit, create and revision drawers as --value-cols. On wider screens the drawer grows from its 640px default up to 92% of the viewport:

  • View and Edit open at the same width for the same value
  • highlighted lines past the cap scroll sideways in the value panel, which owns both scroll axes
  • short values and history use the 640px default where space permits; on mobile, drawers fill the viewport
  • form errors and conflict warnings do not widen the drawer
  • plain text still wraps

the fixed-width drawer wrapped long JSON values mid-line. View and Edit now open at the same width for a given value. Highlighted lines scroll horizontally when they exceed the drawer's width cap.
… in one panel

form error and conflict blocks no longer count toward the drawer's fitted width. The value panel owns both scroll axes, and the estimate leaves room for a classic scrollbar.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying stash with  Cloudflare Pages  Cloudflare Pages

Latest commit: 181bbfc
Status: ✅  Deploy successful!
Preview URL: https://1214c5c5.stash-6yg.pages.dev
Branch Preview URL: https://wider-drawer.stash-6yg.pages.dev

View logs

@umputun
umputun merged commit 6ae04b2 into master Dec 6, 2026
11 checks passed
@umputun
umputun deleted the wider-drawer branch December 6, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant