Skip to content

Add Green Man Gaming deals to the Discounts screen - #5740

Merged
flavioislima merged 9 commits into
mainfrom
feat/gmg-discounts
Jul 7, 2026
Merged

flavioislima merged 9 commits into
mainfrom
feat/gmg-discounts

Conversation

@flavioislima

@flavioislima flavioislima commented Jul 7, 2026 •

Copy link
Copy Markdown
Member

What

Adds Green Man Gaming (GMG) deals to the Discounts screen, alongside the existing GOG deals.

How it works

  • Data source: GMG's Business Affiliate Program catalog (impact.com). A scheduled GitHub Action (.github/workflows/gmg-feed.yml) pulls the per-currency catalogs and publishes discounted items as static JSON on a gmg-feed branch. The app fetches those static files — the Impact credentials live only in Actions secrets and never ship in the binary.
  • Backend: src/backend/discounts/gmg.ts fetches the mirror, normalizes items to the existing CatalogProduct shape, caches per-currency with a daily refresh, and exposes a getGmgDiscounts IPC handler.
  • Affiliate links: GMG catalog items already carry partner-tagged tracking URLs, so they open as-is (external browser); GOG links keep the existing af.gog.com rewrite.

UI

  • Store tabs (All / GOG / GMG) in the topbar.
  • Store logo on each deal card.
  • Currency selector on the GMG tab (GMG publishes one catalog per currency).
  • Platform filter gains an Xbox option (GMG sells console keys); the key's redemption store (Steam, Uplay, …) is surfaced through the Features filter.
  • GMG items are external keys, not installable through Heroic, so GOG-only filters (rating, PEGI, genre, release year, DLC) are hidden on the GMG tab.

Filters adapt to the active tab: GOG-only filters (rating, PEGI, genre, release year, DLC) apply only when the shown set is GOG-only; the price filter is shown per single-store tab (uniform currency) and hidden on the mixed All tab; OS and feature selections only constrain by values the active tab offers.

Fetch GMG's discounted products from a static per-currency feed mirror,
normalize them to the CatalogProduct shape and expose them through the
new getGmgDiscounts IPC handler with a daily in-memory cache.
Daily GitHub Action that pulls GMG's per-currency catalogs from the
impact.com partner API (credentials stay in Actions secrets) and
publishes discounted items as static JSONs on the gmg-feed branch.
Store tabs (All/GOG/GMG), store logo on each card, currency selector
for GMG catalogs, platform filter with Xbox, DRM surfaced through the
Features filter, and GMG links opening in the external browser.
GOG-only filters are hidden and skipped on the GMG tab.
- Show GOG-only filters (rating, PEGI, genre, release year, DLC) only when
  the shown set is GOG-only, so they no longer silently exclude GMG items on
  the All tab.
- Hide and skip the price filter on the mixed All tab, where GOG and GMG
  prices are in different currencies.
- Re-seed the price and release-year ranges on tab change and stop
  persisting them, since their scale is tab/currency-specific.
- Apply only the OS and feature values the active tab offers, so a selection
  carried over from another tab can't empty the grid invisibly.
@flavioislima
flavioislima merged commit 6d32bae into main Jul 7, 2026
10 checks passed
@flavioislima
flavioislima deleted the feat/gmg-discounts branch July 7, 2026 20:12
@Heroic-Games-Launcher Heroic-Games-Launcher locked and limited conversation to collaborators Jul 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant