Repository navigation
Unsloth Studio / Desktop: keep release-notes table links from splitting mid-word in the update popup - #12543
Conversation
|
The new |
|
Review record for #12543, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#353. Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found. Round 1: reviewed mirror
|
|
You have reached your Codex usage limits for security reviews. Please try again later. |
…ng mid-word in the update popup (unslothai#12543) * Unsloth Studio / Desktop: keep release-notes table links from splitting mid-word * Pin release-notes table links to one line in the update banner layout suite --------- Co-authored-by: Daniel Han <[email protected]>
In the update popup's expanded release notes, the "Download Unsloth Desktop" table squeezes its Link column until "Download" breaks across two lines ("Downlo / ad").
Cause
MarkdownPreviewputsoverflow-wrap: anywhereon the whole markdown root. Inside an auto-sized table,anywherelets the browser count a cell as narrow as one character when it works out column widths. So the Link column gets shrunk past the width of the word, and the word splits.Fix
release-notes-panel.tsxsetsoverflow-wrap: break-word(break-words) ontdandthin the expanded notes. Unlikeanywhere,break-worddoesn't let the browser size a column below the width of its longest word, so "Download" stays on one line. Paragraphs, lists and code blocks keep their current wrapping.One trade-off: a cell holding a long unbroken string (a bare URL) now sizes its column to that string in Chromium, so the table scrolls sideways inside its own table frame instead of wrapping the URL. The notes area and the card keep their width, and nothing paints past the card. Firefox still wraps it. This is how GitHub renders wide markdown tables too.
The change only touches the update popup (web and desktop banners share the panel). Other
MarkdownPreviewusers (chat, notes) behave the same as before.Before / after
Expanded notes with a Platform | Link table, merge base vs this branch:
Testing
tests/studio/playwright_update_banner_layout.pygains a "release-notes tables" phase (1440x900 and 390x844; Firefox and WebKit run it in the spot lane): every "Download" link on one line, and no notes table painting past the card. Same test file against both installs: merge base380 checks, 1 failed(links=[['Download', 2], ['Download', 2], ['Download', 2]]), this branch380 checks, 0 failed.tests/studio/test_update_release_notes.py: 202 passed.