Skip to content

[Draft] eckbuilder search UX: smarter defaults, format-aware legality, Unique discoverability - #65

Open
gjuillot wants to merge 10 commits into
Altered-Community:preprodfrom
gjuillot:deck-edit-ux-ui
Open

[Draft] eckbuilder search UX: smarter defaults, format-aware legality, Unique discoverability#65
gjuillot wants to merge 10 commits into
Altered-Community:preprodfrom
gjuillot:deck-edit-ux-ui

Conversation

@gjuillot

Copy link
Copy Markdown
Contributor

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.

  • Faction quick-filter buttons moved into "Advanced search"; the hero's faction is auto-selected on load and re-synced live when the hero changes.
  • Search now runs automatically on load instead of showing an empty state until "Search" is clicked.
  • Hero and Token removed from the type filter row (neither is a real search target: the hero has its own picker, tokens aren't deckbuilder-legal).
  • Rarity and type filters now share one line — rarity left, type right, with the separator centered in whatever gap remains between them.
  • All deck-relevant types (Character, Spell, Landmark Permanent, Expedition Permanent) are preselected by default; Mana is not.
  • "Reset" restores the hero's faction and the default type set instead of clearing them.
  • Cards banned/suspended by the deck's current format are now hidden by default (format legality read from 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.
  • Fixed a bug (introduced while building the above): toggling "Banned"/"Suspended" was inheriting the Cards-page's "drop the rarity restriction" isolate behavior, which let unrelated Unique-rarity cards flood the results.
  • Removed "Errated" and "No effect" from the deckbuilder's status filters — arguably out of scope there (open to disagreement).
  • Cards page: added a small gold-accented nudge ("Looking for a Unique? → Uniques tab") shown whenever Unique is toggled on "Toutes les cartes"/"All cards", since that tab's plain rarity filter misses the dedicated Uniques tab's format/effect/support-effect search. Applies to both the Cards page and the deckbuilder.
  • Uniques tab now adapts to the deck's format:
    • Shows an orange warning banner when the format doesn't allow any Unique cards at all (maxUnique === 0, e.g. Standard No Unique, Singleton No Unique).
    • Preselects the "Frontier" format filter when the deck's format is Frontier.
    • Both re-apply live when the format changes and are restored by "Reset" (Frontier stays selected instead of reverting to "All Uniques").
  • Consolidated the "Looking for a Unique?" nudge and the new format warning into a single banner component that swaps between gold (nudge) and orange (warning) depending on tab + format legality, and moved it to sit right under the tab list instead of further down in the filters.

Screenshots

Display right after clicking Modify

image

Suspended and banned cards not shown by default

image

Sandbox does not filter out banned or suspended

image

Nudge message when a user is tempted to use the unique filter on the "All cards" tab*

image

Nudge message when the user is tempted to search uniques in No uniques format

image image

Frontier is auto-selected in Uniques tab

image

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 _statusActive check in card-search.js.

Ramaining work

  • Fix bug when leaving All Cards tab for another then back to All Cards: the preselection of types is lost
  • Other tabs gut Uniques should have the same pre-selected types

Test plan

  • Open the deckbuilder for an existing deck: confirm the hero's faction and default types are preselected, and results load without clicking Search
  • Change hero mid-session: faction filter updates live
  • Click Reset: hero faction + default types come back (not cleared)
  • Switch deck format between Standard and Sandbox: banned/suspended cards hide/show accordingly, without a manual re-search
  • Toggle "Banned"/"Suspended" when the format disallows them: cards reappear without dragging in unrelated Uniques
  • Toggle Unique on "All cards" (deckbuilder and Cards page): nudge appears, gold-accented, linking to the Uniques tab
  • Cards page: confirm Banned/Suspended/Errated/No-effect filters and the faction quick-filter bar are all unchanged
  • Switch deck format to one with 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
  • Switch deck format to Frontier: Uniques tab preselects "Frontier"; clicking Reset keeps it selected instead of reverting to "All Uniques"

gjuillot added 10 commits July 29, 2026 21:06
…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.
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