[Draft] eckbuilder search UX: smarter defaults, format-aware legality, Unique discoverability - #65
Open
gjuillot wants to merge 10 commits into
Open
[Draft] eckbuilder search UX: smarter defaults, format-aware legality, Unique discoverability#65gjuillot wants to merge 10 commits into
gjuillot wants to merge 10 commits into
Conversation
…t hero faction Faction quick-filter buttons are now under Advanced search in deckbuilder mode only (Cards page unaffected). The hero's faction is auto-selected on load and re-synced live when the hero changes, and the card search runs automatically instead of showing an empty state until "Rechercher" is clicked.
Neither is a real search target in deckbuilder mode: the hero has its own picker, and tokens aren't deckbuilder-legal cards. Cards page keeps the full type list.
…gn type Rarity buttons stay left, type buttons are pushed right via a flexible spacer, and the vertical separator sits centered in whatever gap remains between the two groups instead of hugging the rarity buttons.
…ring it "Réinitialiser" clears every filter including faction; without this, the search would lose its faction scope on reset instead of falling back to the deck's hero. Hooked in after CardSearch's own reset listener so it runs once resetFilters() has already executed.
Personnage, Sort, Repère Permanent and Permanent d'Expédition are now active by default in the type filter row (Mana stays off, mirroring the hero-faction default). Reset restores this same set, alongside the hero faction, instead of clearing types entirely.
…k's format Cards banned or suspended are now excluded from search results by default when the deck's current format doesn't allow them (Standard, Frontier, etc.), and shown again when the format does (Sandbox, Test). The "Banni"/ "Suspendu" advanced-search buttons switch from isolating-only to an "include them anyway" override in deckbuilder mode; the Cards page keeps its original isolate behavior unchanged. The format select re-runs the search live so switching format immediately reflects the new legality, and the two buttons grey out (with an explanatory tooltip) when the selected format already allows everything, since toggling them would have no effect.
…e to Unique Toggling "Banni"/"Suspendu" in deckbuilder mode (include-anyway override) was inheriting the Cards-page isolate behavior of dropping the default rarity restriction, which unintentionally let unrelated Unique-rarity cards flood the results (e.g. searching "Grems" with "Suspendu" on jumped from 2 to 8821 results). Only isErrated still isolates in deck mode now. Left a TODO: the Cards-page isolate behavior itself (same rarity-widening quirk) is being reconsidered and needs a team discussion before deciding whether to align it with deck mode too.
Neither is a meaningful search criterion when building a deck (debatable, per Guillaume). Cards page keeps both unchanged.
Toggling Unique on "Toutes les cartes" quietly returns basic results, missing the dedicated Uniques tab's effect/format search. Show an inline nudge with a link to switch tabs whenever Unique is selected while still on "all". The nudge and the Uniques tab's gem icon share a fixed gold accent instead of var(--primary-400), which some themes (azure) redefine to blue — kept independent of the active color theme, in both pages.
Warn (orange banner) when the deck's current format doesn't allow Unique cards at all (maxUnique === 0), and preselect the Frontier format filter when the deck's format is Frontier — both re-applied live on format change and restored by "Reset". Consolidated the "Looking for a Unique?" nudge and this new warning into a single banner component that swaps content based on tab + format legality, moved to sit right under the tab list. Fully driven by one function (_syncUniqueNudge in card-search.js, no data-tabs attribute) to avoid fighting the generic tab-visibility sweep, which caused a bug the first time around.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Screenshots below
A batch of UX improvements to the card search panel while editing a deck. Everything is scoped to deckbuilder mode only (
$_csMode === 'deck'/MODE === 'deck') — the shared Cards page keeps its existing behavior unless explicitly noted.data/altered.json), and reappear when the format allows them (Sandbox, Test). The "Banned"/"Suspended" advanced-search buttons switch from isolating-only to an "include anyway" override in deck mode, with a tooltip explaining why they're greyed out when the format already allows everything.maxUnique === 0, e.g. Standard No Unique, Singleton No Unique).Screenshots
Display right after clicking Modify
Suspended and banned cards not shown by default
Sandbox does not filter out banned or suspended
Nudge message when a user is tempted to use the unique filter on the "All cards" tab*
Nudge message when the user is tempted to search uniques in No uniques format
Frontier is auto-selected in Uniques tab
Discussion / follow-up (not implemented, needs a team decision)
While fixing the rarity-widening bug above, we found the Cards page's isolate behavior for Banned/Suspended/Errated has the same quirk baked in on purpose (dropping the rarity restriction so "browse all banned cards" isn't accidentally scoped to only Common/Rare/Exalted). Worth discussing whether that's still the right call there too, or should be tightened the same way as deck mode. Left a
TODO(discuss with team)comment at the relevant_statusActivecheck incard-search.js.Ramaining work
Test plan
maxUnique: 0(e.g. Standard No Unique): orange banner appears on both "All cards" (with Unique toggled) and the Uniques tab; disappears when switching to a format that allows Uniques