Skip to content

Deck UI: size the game-page overlay to the real hero, not the window - #3

Merged
Alexsander720 merged 1 commit into
Alexsander720:mainfrom
Guacam-Ole:fix/desktop-big-picture-hero
Nov 30, 2026
Merged

Alexsander720 merged 1 commit into
Alexsander720:mainfrom
Guacam-Ole:fix/desktop-big-picture-hero

Conversation

@Guacam-Ole

Copy link
Copy Markdown
Contributor

deckGeometry() assumed the game page hero fills the window with Steam's Play row inside it, as on the Deck screen and on a docked monitor. In desktop Big Picture (1920x1080 at DPR 1.42 -> 1353x761 CSS px) Steam draws the hero as a 351 px band and places the Play row below it. The overlay was stretched to 761 px and the bottom-anchored fact bar landed on the Activity feed, covering the "Latest update" card.

The panel now measures the hero element next to its <style> node (and re-measures on ResizeObserver/resize). When the hero fills the window the previous numbers come out unchanged; when it is a band, .gh-root is shortened to the hero height, the fact bar sits BAR_GAP above its bottom edge and the Deck text size is kept (zooming the panel down to the band made the text too small).

TL;DR: Currently the UI does work on Steam Deck but not on Steam Big Picture Mode on big screns (The Game stats are hidden behind game updates). THis fixes that behaviour

deckGeometry() assumed the game page hero fills the window with Steam's
Play row inside it, as on the Deck screen and on a docked monitor. In
desktop Big Picture (1920x1080 at DPR 1.42 -> 1353x761 CSS px) Steam
draws the hero as a 351 px band and places the Play row below it. The
overlay was stretched to 761 px and the bottom-anchored fact bar landed
on the Activity feed, covering the "Latest update" card.

The panel now measures the hero element next to its <style> node (and
re-measures on ResizeObserver/resize). When the hero fills the window the
previous numbers come out unchanged; when it is a band, .gh-root is
shortened to the hero height, the fact bar sits BAR_GAP above its bottom
edge and the Deck text size is kept (zooming the panel down to the band
made the text too small).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Alexsander720

Copy link
Copy Markdown
Owner

Thanks for fixing this. It helps stock Steam Deck setups without Clean Gameview too, alongside desktop Big Picture.

Two edge cases I noticed while reading through the diff:

  1. With Clean Gameview enabled on Deck, TopCapsule is calc(100vh - 80px) while HeaderBackgroundImage stays full height behind the transparent Play bar. Because heroH is ~80px shorter than win.innerHeight, barInside evaluates to false and .gh-root gets clipped right above the Play row, which cuts off live video backgrounds with a hard line.
  2. heroOf(styleEl) checks all children of InnerContainer. If TopCapsule hasn't laid out yet on first paint (offsetHeight <= 100), .find() could grab the Activity/body div below styleEl instead and scale .gh-root way past the viewport. Limiting the lookup to elements before styleEl (or matching DFL.appDetailsHeaderClasses?.TopCapsule) and clamping heroH <= win.innerHeight should prevent that.

Since maintainer edits are enabled, I'm happy to push a small follow-up commit for those two checks if you'd rather not spend more time on it, or you can update the branch yourself. Either works for me!

Alexsander720 added a commit that referenced this pull request Nov 30, 2026
- heroOf() looks only at siblings BEFORE the panel's <style>, prefers Steam's
  TopCapsule and never latches onto the PlaySection/Activity feed below it
  (first paint: capsule 0 px, Activity ~1800 px zoomed the panel x3).
- deckGeometry() clamps the hero to the window and treats a hero that ends
  within one Play bar (+24 px) of the bottom - or two bars when the header
  image still fills the window - as full-window with the bar inside: Clean
  Gameview (capsule 454 / image 534) no longer clips .gh-root/.gh-bg above
  the transparent Play bar. Deck/dock numbers and the desktop Big Picture
  351 px band are unchanged.
- watchHero(): ResizeObserver follows the current hero, MutationObserver
  catches late/replaced heroes, bounded retries for hosts without observers.
- tests/deck/test_deck_hero_geometry.{py,cjs}: real functions from
  dist/index.js across handheld, dock, Clean Gameview, desktop band, initial
  mount and late-hero cases.
@Alexsander720
Alexsander720 merged commit 5e80287 into Alexsander720:main Nov 30, 2026
@Alexsander720

Copy link
Copy Markdown
Owner

Merged and shipped in v0.1.6 (and now v0.1.7). Thanks again for catching the Clean Gameview sizing.

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.

2 participants