Skip to content

Merge Tier Template into Tier List; pool accepts any card#628

Merged
richardhjtan merged 2 commits into
mainfrom
merge-tier-template-into-tier-list
Jun 24, 2026
Merged

Merge Tier Template into Tier List; pool accepts any card#628
richardhjtan merged 2 commits into
mainfrom
merge-tier-template-into-tier-list

Conversation

@richardhjtan

Copy link
Copy Markdown
Collaborator

Why

User feedback on the tier-list feature: the separate Tier Template card was confusing — you had to create one and link it before a Tier List could do anything, even though the template was really just "a feature to generate items." This merges the two so a single Tier List card does everything.

What changed

Merge template → list

  • The item pool and Generate with AI now live directly on TierList. The TierTemplate card, its example instance, and its Spec are deleted; the template link is removed.
  • Tiers default to a standard S/A/B/C/D/F set (no template to inherit from).
  • Migrated the example: folded Programming Languages' items onto My Language Ranking and dropped the template link.

Pool accepts any card

  • items is now linksToMany(() => CardDef) — the pool can hold any card type, each rendered via its own fitted view (getComponent). Generation still mints TierItem cards.

One shared board, two formats

  • A single TierBoard component drives both views via an @editing flag:
    • Isolated (list) view — read-only tier bands + drag-to-rank only.
    • Edit view — the same board extended with tier add/rename/recolor/remove, AI generation, a per-tile remove (×), an "Add a card" chooser button in the toolbar, and an editable name.

UX fixes from testing

  • Suppress the fitted card's default container border (@displayContainer={{false}}).
  • Center text-only item labels (name-only cards no longer pin to the corner).
  • Filter only appears when the pool is large (>20 items).
  • Both views flow inside a scrolling host with a sticky Unranked tray, so the tray is never clipped below the fold.

Testing

Manually tested in a local catalog realm: ranking persists, generation populates the pool, any-card fitted rendering works, edit/list views scroll correctly, and the example (My Language Ranking) renders end-to-end.

🤖 Generated with Claude Code

Based on user feedback that the separate Tier Template card was confusing
(you had to create + link one before a Tier List could do anything), this
folds the template's capabilities directly into Tier List:

- Pool of items + "Generate with AI" now live on TierList itself; the
  TierTemplate card, its instance, and Spec are removed. The `template`
  link is gone.
- `items` is now linksToMany(CardDef): the pool accepts ANY card, each
  rendered via its own fitted view (generation still mints TierItem cards).
- One shared TierBoard component drives both formats:
  * isolated (list) view = read-only tier bands + drag-to-rank only.
  * edit view = same board extended with tier editing, AI generation,
    per-tile remove, an "Add a card" chooser button, and an editable name.
- Tiers default to a standard S/A/B/C/D/F set (no template to inherit from).
- UX fixes from testing: suppress the fitted card's default container border,
  center text-only item labels, gate the filter to large pools (>20), and
  make both views flow inside a scrolling host with a sticky tray so the
  unranked tray is never clipped.
- Migrated the example: folded the Programming Languages items onto
  My Language Ranking and dropped the template link.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 24, 2026 02:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR simplifies the tier-list feature by removing the separate TierTemplate card concept and moving the item pool + AI generation directly onto TierList, while also allowing the pool to link to any card type and render each via its own fitted view.

Changes:

  • Removed the TierTemplate card/spec/example and eliminated the template relationship from TierList usage.
  • Added items: linksToMany(() => CardDef) on TierList, updated the board UI to render arbitrary cards via getComponent(...)/fitted, and migrated the example TierList to link items directly.
  • Added default tiers (S/A/B/C/D/F) and consolidated isolated/edit UI onto a shared TierBoard with an @editing flag, including AI pool generation in edit mode.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
d29736-tier-list/TierTemplate/programming-languages.json Deleted the TierTemplate example instance.
d29736-tier-list/TierList/my-language-ranking.json Migrated the example TierList to link items directly (no template).
d29736-tier-list/tier.gts Updated Tier field comment to reflect TierList-only usage.
d29736-tier-list/tier-template.gts Deleted the TierTemplate card implementation.
d29736-tier-list/tier-list.gts Major refactor: TierList owns items, default tiers, shared board component, fitted rendering for arbitrary cards, and AI generation in edit mode.
d29736-tier-list/tier-item.gts Adjusted fitted layout to better center name-only tiles and improve label wrapping.
d29736-tier-list/Spec/d7d3d0cf-ab11-437e-b102-bdabbb3a9cf4.json Deleted the TierTemplate Spec.
d29736-tier-list/Spec/d6aa929f-53d7-43d0-8fab-11037e3102bd.json Updated TierList Spec README to match the new merged model and views.
d29736-tier-list/CardListing/e442113f-570a-4053-be33-2756371f88bb.json Removed TierTemplate spec from the listing’s referenced specs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread d29736-tier-list/tier-list.gts Outdated
Comment thread d29736-tier-list/tier-list.gts Outdated
@richardhjtan richardhjtan force-pushed the merge-tier-template-into-tier-list branch from 0393b9f to 3e12e49 Compare June 24, 2026 10:07
- Loosen TierBoard's model arg type (boxed model has optional fields, so the
  strict TierList type was incompatible) — fixes lint:types error.
- itemLabel: also fall back to cardInfo.name and wrap in String() so filtering
  works for any card type and never yields "[object Object]".
- Only apply the unranked filter while its input is visible (showFilter), so a
  stale filter value can't hide items after the pool shrinks below threshold.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@richardhjtan richardhjtan force-pushed the merge-tier-template-into-tier-list branch from 3e12e49 to 73fcebd Compare June 24, 2026 10:20
@richardhjtan richardhjtan merged commit 6dabbf2 into main Jun 24, 2026
1 of 2 checks passed
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.

2 participants