Skip to content

Conversation

@ClementTsang
Copy link
Owner

@ClementTsang ClementTsang commented Nov 15, 2025

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:

  • Windows
  • macOS
  • Linux

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, doc pages, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts
  • If relevant, new tests were added (don't worry too much about coverage)

@codecov
Copy link

codecov bot commented Nov 15, 2025

Codecov Report

❌ Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.81%. Comparing base (d32b503) to head (82a4098).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/canvas.rs 0.00% 17 Missing ⚠️
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     
Flag Coverage Δ
macos-14 37.98% <0.00%> (ø)
ubuntu-latest 44.32% <0.00%> (+6.39%) ⬆️
windows-2022 38.33% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a 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.

@ClementTsang ClementTsang enabled auto-merge (squash) November 15, 2025 18:52
@ClementTsang ClementTsang merged commit c97cb06 into main Nov 15, 2025
38 checks passed
@ClementTsang ClementTsang deleted the better_help_text_size branch November 15, 2025 18:56
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Nov 21, 2025
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

- [#&#8203;1859](ClementTsang/bottom#1859): Ensure average CPU is drawn on top in "All" mode.
- [#&#8203;1867](ClementTsang/bottom#1867): Fix network graph y-axis height cache not updating correctly.
- [#&#8203;1867](ClementTsang/bottom#1867): Fix network graph y-axis occasionally starting with a range of zero.

##### Other

- [#&#8203;1863](ClementTsang/bottom#1863): Replace bottom icon with a square version.
- [#&#8203;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=-->
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