Repository navigation
feat: the maintainer's console art in tiers on the usage screen - #16
Merged
Merged
Conversation
keelbanner.choose() now picks the largest tier the dialog has room for, wide, full, small, none, from the files keel-core installs in /etc/keel: the UTF-8 ladder when the locale dialog inherits is UTF-8, the ASCII one otherwise. The room is measured as dialog uses it on trixie: the screen less the backtitle and the shadow (four rows, four columns), and the usage text wrapped at the box width plus five rows of frame, the blank row Console._wrapper adds, and the button. The box widens for a mark wider than it and grows by the mark's rows, never past the room. This replaces the 24 row floor and the fixed 25 row box, which made the box overlap the backtitle once a mark was added. keelbanner.py stays at 100 percent; 682 tests.
1 of 2 tasks
2 tasks
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.
keelbanner.choose() picks the largest tier (wide, full, small, none) the dialog has room for, from the files keel-core installs in /etc/keel; UTF-8 tiers when the locale dialog inherits is UTF-8, ASCII otherwise.
Room is measured as dialog uses it (checked with dialog 1.3 on trixie): screen less backtitle and shadow (4 rows, 4 cols); the usage text wrapped at the box width plus 5 rows of frame, the blank row Console._wrapper adds, and the button. The box widens for the wide mark and grows by the mark's rows, never past the room. Replaces the 24 row floor and the fixed 25 row box.
At 80x24 a dual stack usage text (11 rows) leaves no room for any tier; the small one fits above 7 rows or fewer.
Needs Keel-Linux/keel-core#19, which installs the art.
Test plan