Repository navigation
fix(ui): keep sub-navigation labels on one line - #1169
Draft
Claudius-Maginificent wants to merge 3 commits into
Draft
Claudius-Maginificent wants to merge 3 commits into
Claudius-Maginificent wants to merge 3 commits into
Conversation
A sub-navigation panel takes its width from the previous frame, and its
buttons wrapped their labels to fit. Once a label wrapped, for example in
a briefly narrow window, the panel stayed narrow for good and the Tokens
labels broke mid-word ("Token Creato/r") at 1050x700. The narrow width is
also persisted across restarts.
Navigation buttons no longer wrap their labels, so the panel always
returns to the width of its longest label and keeps it across the token
screens.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The labels also broke mid-word at 1260x780, so the regression test now covers both window sizes users run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comparing the button width with the bare text width let a label that wrapped onto two short lines, such as "My Tokens", pass. The test now fails whenever a navigation button is taller than one line of text. The fix makes navigation buttons size to their full label, so the resizable DashPay chooser can no longer be dragged narrower than its widest label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Collaborator
|
🕓 Review not started yet because this PR is a draft.
Commit 9ac623c. Normal review starts when eligible; priority review starts as soon as a slot is available. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
The side menus under Tokens, Tools and DashPay keep their labels on one line and keep a steady width. Before, they could shrink and break words in half ("Token/Creato/r") and stay that way even after a restart.
User story
As a user, I want the side menu labels to stay readable at any normal window size, so that I can find Search Tokens and Token Creator at a glance.
Scenario
Steps to reproduce
Actual behavior
Expected behavior
Detailed discussion
PanelState, which is the actual content rect (minimum 96 px). eframe persists it inapp.ron.nav_buttonlabels could wrap, one narrow frame shrank the panel to the wrapped buttons, and it never grew back.nav_buttoninsrc/ui/components/subscreen_chooser_panel.rsnow usesTextWrapMode::Extend. Labels never wrap, so the content width restores the panel on the next frame, including from a persisted narrowapp.ron.Testing
tests/kittest/tokens_screen.rs::token_subnav_labels_stay_on_one_line: a 300 px episode followed by 1050×700 and 1260×780, visiting Search Tokens, My Tokens and Token Creator.cargo test --test kittest --all-features token: 17 passed. Tools, DashPay and subscreen kittests pass.-D warnings.🤖 Co-authored by Claudius the Magnificent AI Agent
🤖 Generated with Claude Code