Repository navigation
Add Green Man Gaming deals to the Discounts screen - #5740
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds Green Man Gaming (GMG) deals to the Discounts screen, alongside the existing GOG deals.
How it works
.github/workflows/gmg-feed.yml) pulls the per-currency catalogs and publishes discounted items as static JSON on agmg-feedbranch. The app fetches those static files — the Impact credentials live only in Actions secrets and never ship in the binary.src/backend/discounts/gmg.tsfetches the mirror, normalizes items to the existingCatalogProductshape, caches per-currency with a daily refresh, and exposes agetGmgDiscountsIPC handler.af.gog.comrewrite.UI
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.