Skip to content

Fix weather panel hero overlapping location at triple-digit temps - #7560

Closed
guilhermetk wants to merge 1 commit into
omacom:quattrofrom
guilhermetk:fix-weather-hero-overflow
Closed

guilhermetk wants to merge 1 commit into
omacom:quattrofrom
guilhermetk:fix-weather-hero-overflow

Conversation

@guilhermetk

Copy link
Copy Markdown
Contributor

The hero row anchors the icon+temperature cluster to the left edge and the location/stats column to the right edge of a fixed-width card with no collision guard, so a three-digit (or negative) reading widens the left cluster past the right column and the unit ends up drawn over the location label (#6991).

Step the hero icon (64 -> 56) and temperature (56 -> 44) down a size whenever the rounded reading is 3+ characters, which keeps the two sides separated for any temperature the providers can return.

Before:
screenshot-2026-08-19_15-54-52

After:
screenshot-2026-08-19_16-23-18

The hero row anchors the icon+temperature cluster to the left edge and
the location/stats column to the right edge of a fixed-width card with
no collision guard, so a three-digit (or negative) reading widens the
left cluster past the right column and the unit ends up drawn over the
location label (omacom#6991).

Step the hero icon (64 -> 56) and temperature (56 -> 44) down a size
whenever the rounded reading is 3+ characters, which keeps the two
sides separated for any temperature the providers can return.
Copilot AI balanced review requested due to automatic review settings August 20, 2026 01:07

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

Pull request overview

Prevents weather-panel overlap for wide temperatures by reducing hero sizing when readings contain three or more characters.

Changes:

  • Detects wide temperature readings.
  • Reduces hero icon and temperature sizes accordingly.
  • Adds regression assertions.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
shell/plugins/panels/weather/Panel.qml Adds responsive hero sizing for wide temperatures.
test/shell.d/weather-test.sh Verifies the threshold and adjusted sizes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dmillzilla dmillzilla left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tested locally on Omarchy 4.0.4-1 at 125% display scaling with forced temperature values. The fix gave both three-digit and negative two-digit temps comfortable spacing while preserving typical two-digit positive temp values. Visual testing looks good on my setup, thanks for the fix!

Before

Image

After

Image

@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for picking this up from #6991. Reviewed against quattro, reading the code only. Nothing was run on a worker, because another open pull request fixes the same overlap more generally, and verifying a fix that should not be the one to land would spend a worker on nothing.

What was checked. The hero row in shell/plugins/panels/weather/Panel.qml puts the icon and temperature on the card's left edge and the location and stats column on its right edge. Nothing stops the two from meeting. The card is Style.space(480) wide, and Style.space scales with the bar font size by default (effectiveSpacingScale in shell/Commons/Style.qml). The hero's 64/56 pixel sizes don't scale with it. That gives #6991 two triggers:

  • the smallest bar font (9px), where the card shrinks to about 360 while the hero keeps its size, which is the original report there;
  • a three-digit reading at default size, which is the one this change addresses.

This change switches to smaller sizes when reportTempNum has three or more characters. That helps the second trigger, but not the first: at 9px with a two-digit Celsius reading, wideHeroTemp is false and the layout is unchanged. The character count also stands in for a width it never measures. On a narrower card the stepped-down sizes can still overlap, and the added tests only check that the source text is present.

Competing fixes. Three other open pull requests change this row:

Of these, #11238 fixes the cause. This one fixes one of its symptoms.

Second opinion. Codex Medium was asked to compare all four without being told this conclusion, and chose #11238 for the same reason. It could read this session's working files, so its independence isn't guaranteed. On its own, it measured a stress case with the actual font: at default width, the stepped-down sizes clear by about 42px, so it found no default-size failure for this change. It also noted that #10540 complements #11238, because a long location name overflows to the right, which the scaling doesn't measure.

What happens next. This waits on the maintainer to choose between the fixes for #6991. Nothing was pushed to your branch.

@omarchybot

Copy link
Copy Markdown
Collaborator

Thank you for this, @guilhermetk. #11238 fixes the same problem in a way the review judged better, so this is closed in favour of it. If it does not cover your case, please say so there.

Closed at the maintainer's request. The review comment above has the details; it was done by Claude Opus 5.5 with Codex Medium as a second opinion, whose agreement is not independent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants