Skip to content

Battery Hold Charge: ui state; api docs#30628

Merged
andig merged 1 commit into
masterfrom
docs/battery_hold_charge
Jun 9, 2026
Merged

Battery Hold Charge: ui state; api docs#30628
andig merged 1 commit into
masterfrom
docs/battery_hold_charge

Conversation

@naltatis

@naltatis naltatis commented Jun 8, 2026

Copy link
Copy Markdown
Member

api docs and ui communication for new hold charge state introduced in #27906

@naltatis naltatis added infrastructure Basic functionality ux User experience/ interface labels Jun 8, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The new batteryChargeHold state and passing it as hold in iconProps makes the meaning of the hold flag ambiguous (discharge vs. charge hold); consider renaming the prop or wiring both batteryHold and batteryChargeHold explicitly to better reflect their semantics in the icon component.
  • Both batteryChargeLabel and batteryDischargeLabel now build translation keys with string interpolation (battery...ChargeHold / DischargeHold); consider centralizing this mapping in a small helper or enum-to-key function to reduce duplication and avoid subtle key mismatches as more modes are added.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new `batteryChargeHold` state and passing it as `hold` in `iconProps` makes the meaning of the `hold` flag ambiguous (discharge vs. charge hold); consider renaming the prop or wiring both `batteryHold` and `batteryChargeHold` explicitly to better reflect their semantics in the icon component.
- Both `batteryChargeLabel` and `batteryDischargeLabel` now build translation keys with string interpolation (`battery...ChargeHold` / `DischargeHold`); consider centralizing this mapping in a small helper or enum-to-key function to reduce duplication and avoid subtle key mismatches as more modes are added.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@andig andig merged commit 7d4e57e into master Jun 9, 2026
14 checks passed
@andig andig deleted the docs/battery_hold_charge branch June 9, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Basic functionality ux User experience/ interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants