Skip to content

Tier list des héros : nouveau plugin dans « Communauté & Aide » - #205

Merged
julesduroux merged 1 commit into
preprodfrom
feat/hero-tier-list
Nov 27, 2026
Merged

julesduroux merged 1 commit into
preprodfrom
feat/hero-tier-list

Conversation

@Yutsa

@Yutsa Yutsa commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Tier list des héros

A new SPA plugin, hero-tier-list (Angular 22), on /pages/hero-tier-list: rank the Altered heroes in tiers from their full arts, then export the ranking as a PNG. The idea comes from a community HTML tool ("Altered Hero Tier List – Stream Edition"). The code is rewritten from scratch on the site's design system; the stream/OBS mode, JSON import/export and share link are not ported.

Its menu entry goes at the end of « Communauté & Aide » (manifest menu → parent_url, the menu's HelloAsso URL). If production's menu has another URL, the entry lands at the top level, to move in the admin.

Screenshots (desktop 1440 × 900, mobile 390 × 844)

A saved ranking: tiers on the left, heroes to rank on the right (below on mobile), with search, faction and set filters.

1-classement

Drag and drop: the art follows the pointer, the dashed slot shows where it lands, the hero taken from the list stays faded there. On mobile, after a long press.

2-glisser-deposer

Tap (or keyboard): a hero picked, the bar places it in a tier.

3-placer-au-toucher

Edit tiers: name, colour, order, delete; « Ajouter un tier » at the bottom.

4-modifier-les-tiers

PNG export of the same ranking:

PNG export

What it does

  • Heroes: cards API (card_groups?cardType=HERO), 36 today; new heroes appear on their own.
  • Images: the frameless full art from the CDN (illustrations/{SET}/{REF}_FRAMELESS_T1.webp, then the HD JPEG, then cards/assets/), cropped on the face and framed in the faction's colour.
  • Drag and drop (drag/hero-drag.ts, pointer events):
    • the art follows the pointer at the spot it was grabbed by;
    • a dashed slot shows the landing place in reading order, the empty end of a tier meaning « last »;
    • the other heroes slide aside, the dropped one settles into its slot;
    • the page and the list of heroes auto-scroll near their edges; Escape or a drop outside puts the hero back.
    • The Angular CDK was tried first: its wrapping lists insert before the nearest hero, so the end of a tier could not be reached.
  • Touch and keyboard: a long press starts a drag, so a swipe still scrolls. A tap (or Enter) opens a bar with the tiers, move left/right and « Retirer ».
  • Tiers: rename, recolour (7 new --ac-tier-* tokens, light and dark), reorder, add, delete.
  • Also: undo / redo; « Tout retirer » with Annuler in its message; tile sizes S/M/L; search and faction / set filters on the heroes to rank. The ranking is saved in localStorage.
  • PNG export: drawn on a canvas in the site's current theme: title, count and date, tiers, credit line.

Other changes

  • design-system/tokens/tokens.css: --ac-tier-* tokens (tier colours and their text).
  • docker-compose.stack.yml: the plugin is active by default on the stack, so the CI runs its e2e tests.
  • plugins/rebuilder/e2e/screens.ts: the screen is in the loading checks (AGENTS.md rule).

Checks

  • Plugin: lint + i18n (58 messages, all translated) and 17 unit tests (ranking, heroes, landing slot).
  • 11 e2e tests on desktop and mobile:
    • menu entry, drag to a tier, reorder within a tier, unrank, undo, reload;
    • long-press touch drag, tap + tier;
    • the art stays under the pointer;
    • a drag released in place is not a tap;
    • tier editing, PNG export.
  • Loading checks on the new screen: 6 runs, no layout shift over budget.
  • php tests/run.php: 148 passing.
  • Not tried on a real phone: the touch drag is tested with Chrome's touch emulation.

🤖 Generated with Claude Code

Rank the Altered heroes in tiers from their full arts and export the ranking
as a PNG, on /pages/hero-tier-list, in the « Communauté & Aide » menu. Idea from
a community HTML tool, rewritten in Angular on the design system.

- Heroes from the cards API, frameless full arts from the CDN.
- Own pointer drag and drop: the art follows the pointer, a slot shows the
  landing place in reading order (end of a tier included), the other heroes
  slide aside, auto-scroll; long press on touch screens. Tap + action bar for
  touch and keyboard.
- Tiers: rename, recolour (--ac-tier-* tokens), reorder, add, delete; undo /
  redo; sizes S/M/L; search and filters on the heroes to rank; saved in
  localStorage.
- PNG export drawn on a canvas in the site's theme.
- Active by default on the stack (CI e2e), screen added to the loading checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Yutsa added a commit that referenced this pull request Nov 27, 2026
Yutsa added a commit that referenced this pull request Nov 27, 2026
@julesduroux
julesduroux merged commit c7e448c into preprod Nov 27, 2026
9 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