Skip to content

bug: fix issue with battery widget time and small widths #1787

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

Merged
merged 2 commits into from
Aug 15, 2025

Conversation

ClementTsang
Copy link
Owner

@ClementTsang ClementTsang commented Aug 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:

Fix an issue where we used the full width of the battery widget to determine when to use short times - we should use half of it.

Before:

image

After:

image

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)

Copy link

codecov bot commented Aug 15, 2025

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.74%. Comparing base (e23af2f) to head (3dde19a).

Files with missing lines Patch % Lines
src/canvas/widgets/battery_display.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1787      +/-   ##
==========================================
+ Coverage   42.12%   42.74%   +0.62%     
==========================================
  Files         115      111       -4     
  Lines       16057    15732     -325     
==========================================
- Hits         6764     6725      -39     
+ Misses       9293     9007     -286     
Flag Coverage Δ
macos-14 37.36% <0.00%> (-0.01%) ⬇️
ubuntu-latest 43.67% <0.00%> (-0.03%) ⬇️
windows-2022 ?

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.

@ClementTsang ClementTsang marked this pull request as ready for review August 15, 2025 00:50
@ClementTsang ClementTsang changed the title bug: fix issue with battery time and small widths bug: fix issue with battery widget time and small widths Aug 15, 2025
@ClementTsang ClementTsang enabled auto-merge (squash) August 15, 2025 00:51
@ClementTsang ClementTsang merged commit 849edf7 into main Aug 15, 2025
32 of 33 checks passed
@ClementTsang ClementTsang deleted the fix_battery_width_time_to_full branch August 15, 2025 00:56
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Aug 16, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ClementTsang/bottom](https://github.com/ClementTsang/bottom) | patch | `0.11.0` -> `0.11.1` |

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.1`](https://github.com/ClementTsang/bottom/blob/HEAD/CHANGELOG.md#0111---2025-08-15)

[Compare Source](ClementTsang/bottom@0.11.0...0.11.1)

##### Bug Fixes

- [#&#8203;1776](ClementTsang/bottom#1776): Fix `disk.columns` being incorrectly interpreted as blank.
- [#&#8203;1787](ClementTsang/bottom#1787): Fix issue with battery widget time and small widths.

##### Other

- [#&#8203;1779](ClementTsang/bottom#1779), [#&#8203;1788](ClementTsang/bottom#1788): Speed up time between startup and displaying data.

</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:eyJjcmVhdGVkSW5WZXIiOiI0MS43MS4wIiwidXBkYXRlZEluVmVyIjoiNDEuNzEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
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