-
Notifications
You must be signed in to change notification settings - Fork 316
other: clean up help text spacing + help text dialog sizing #1865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1865 +/- ##
==========================================
+ Coverage 36.71% 42.81% +6.09%
==========================================
Files 115 115
Lines 16096 16096
==========================================
+ Hits 5910 6891 +981
+ Misses 10186 9205 -981
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the help dialog's visual presentation by standardizing text spacing and implementing dynamic width calculations to minimize unnecessary text wrapping.
Key Changes:
- Consolidated multi-line help entries and aligned spacing to 20 characters between keybindings and descriptions
- Implemented compile-time calculation of maximum text length for optimal dialog sizing
- Added dynamic width adjustment logic that centers the dialog with proper margins when space permits
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/constants.rs | Standardized help text spacing across all sections and reduced GENERAL_HELP_TEXT array from 32 to 28 entries by consolidating multi-line keybindings |
| src/canvas.rs | Added MAX_TEXT_LENGTH const computation and improved dialog width calculation using Flex::SpaceAround for better centering with margin handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [ClementTsang/bottom](https://github.com/ClementTsang/bottom) | patch | `0.11.3` -> `0.11.4` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>ClementTsang/bottom (ClementTsang/bottom)</summary> ### [`v0.11.4`](https://github.com/ClementTsang/bottom/blob/HEAD/CHANGELOG.md#0114---2025-11-16) [Compare Source](ClementTsang/bottom@0.11.3...0.11.4) ##### Bug Fixes - [#​1859](ClementTsang/bottom#1859): Ensure average CPU is drawn on top in "All" mode. - [#​1867](ClementTsang/bottom#1867): Fix network graph y-axis height cache not updating correctly. - [#​1867](ClementTsang/bottom#1867): Fix network graph y-axis occasionally starting with a range of zero. ##### Other - [#​1863](ClementTsang/bottom#1863): Replace bottom icon with a square version. - [#​1865](ClementTsang/bottom#1865): Improve help dialog width calculation. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Description
A description of the change, what it does, and why it was made. If relevant (such as any change that modifies the UI), please provide screenshots of the changes:
This PR fixes some text spacing with the help text dialog, and also does better width calculations to avoid multi-line unless necessary.
Issue
If applicable, what issue does this address?
Closes: #
Testing
If relevant, please state how this was tested. All changes must be tested to work:
If this is a code change, please also indicate which platforms were tested:
Checklist
If relevant, ensure the following have been met:
cargo fmt)README.md, help menu, doc pages, etc.)