Skip to content

Add a savings percentage column to the Steam library - #689

Open
Angle-AOB wants to merge 1 commit into
IridiumIO:masterfrom
Angle-AOB:feat/steam-savings-percent-column
Open

Angle-AOB wants to merge 1 commit into
IridiumIO:masterfrom
Angle-AOB:feat/steam-savings-percent-column

Conversation

@Angle-AOB

@Angle-AOB Angle-AOB commented Oct 12, 2026 •

Copy link
Copy Markdown

What

Adds a SAVINGS % column to the Steam library list: the savings already shown next to it, as a percentage of the game's original uncompressed size.

This is the formula from #98, where you noted percentages are more intuitive to most people than a ratio.
截图

Why a new DisplayedSavingsPercentage instead of the existing SavingsPercentage

SteamDetailedResult already has SavingsPercentage, but it derives from DetailSavings while the row's SAVINGS cell shows DisplayedSavings. The two diverge for a compressed game with a pending Steam update - the row shows the wiki estimate, the details pane shows the measured figure. Reusing SavingsPercentage would put a percentage in the row that does not describe the number immediately to its left. The details pane keeps using SavingsPercentage, which is correct there since it displays DetailSavings.

Column sizing

The header button needs 102px: the Fluent Button style raises FontSize to 14, and the sort icon plus its margins add 19px. Star sizing only gave the column 89px at a 1104px-wide window and clipped the trailing %, so the column is fixed at 104px. The SAVINGS column's MinWidth goes 60 -> 88 so that taking 104px out of the pool does not clip its 85.4px header in turn.

Tradeoff, worth your judgement before merging: this page has no responsive handling - the header grid and the row template grid are hand-duplicated with identical column definitions - so the 104px comes out of the one flexible column, GAME. At a 1104px window GAME drops to its 135px floor and long names ellipsize, where the 6-column layout gave it roughly 198px.

Localisation

Only en-AU (source) and zh-CN got entries. The other catalogues will pick up # LOC:TODO stubs from the next Debug build's LocalisationCatalogueBuilder run, which is the route your translators already use - and it keeps this out of the way of #686 and #678, which rewrite it-IT.toml and tr-TR.toml wholesale.

@version and manifest.toml are bumped for both files. Without that, SynchroniseEmbeddedLanguagesAsync will not overwrite an existing user's local copy (it compares versions), so upgraders would never see the new string even once it exists in the repo.

Verification

  • Builds Debug and Release; the 6 existing tests pass.
  • Header renders complete in English and Simplified Chinese at 1104px.
  • Sorting cycles ascending -> descending -> back to GAME, from both the header button and the Sort menu.
  • Percentages cross-checked against the byte columns on real data: Outer Wilds 4.74 GB saved against 10.86 GB original = 43.6% -> shows 44%; shapez 121 MB / 372 MB = 32.5% -> 33%; Lossless Scaling 83 MB / 175.3 MB = 47.3% -> 47%.
  • Not verified: a game in Recently Updated state. That is the only case where DisplayedSavings and DetailSavings diverge, and I had no sample to test against.

The byte figure already shown per row is hard to judge against the size of
the game, so add the percentage of the original folder size it represents.

The column is derived from DisplayedSavings rather than DetailSavings: a
compressed game with a pending Steam update shows an estimate in the list
but an actual figure in the details pane, and the two adjacent cells in a
row must agree with each other.

The header needs 102px at the 14px font the Fluent button style applies, so
the column is fixed rather than star-sized; star sizing squeezed it to 89px
and clipped the trailing "%". The Savings column's minimum rises from 60 to
88 for the same reason.
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