Keep a whole row in "Autres champions" and tidy the cards code (#75)

- "Autres champions" grid is never shorter than one card row.
- A Format change keeps the home's statistics (#71); the home cards
  are built when "Defi" is shown again; hidden grids give back their
  decoded portraits; the card holds its portrait as Arc<Path>.
- Unavailability becomes Unpickable (glossary), "selection" becomes
  "champ select" in comments (#74); the statistics error is shown by
  the banner only during a champ select.
- Column breakpoints follow the mockup's max-width rules, the home
  tools row is search, filters, sort; stale comments fixed.
- Tests: whole row, hidden grids, stats scopes, error shown once, and
  the capture's reasons end to end in the open section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nessarandClaude Opus 5.5 committed 2026-11-21 02:26:14 +01:00
1 parent 2cd8b2c545
commit 4612d89a3d
8 files changed
+535 -159

No files matched your search

+5 -5
View File
@@ -9,7 +9,7 @@ use std::time::{Duration, Instant};
use arena_tracker_core::{
Account, ChampSelect, ChampionRow, ChampionState, ClientError, ClientEvent, Format,
MATCH_RETRIES, ProgressCheck, RETRY_EVERY_MS, Scope, SeasonScope, SourceError, Tracker,
Unavailability, UpdateProblem,
Unpickable, UpdateProblem,
};
use common::{
FakeClient, FakeHistory, PlayedMatch, RawChampSelect, S2, S2_TRACK, SELF_PUUID, at, date,
@@ -1064,19 +1064,19 @@ fn arena_champ_select_replays_bans_hovers_and_lock_in_for_the_current_challenge(
// The reasons the champ select gives for the champions of the capture. The anvil champions
// 64, 5 and 68 are not in the client's pickable list. The player's own pick is never
// unavailable, whatever the bans and allies say.
// unpickable, whatever the bans and allies say.
fn assert_reasons(pick: &ChampSelect, banned: &[u32], taken: &[u32]) {
for id in [12, 16, 25, 50, 64, 5, 68, 103, 233] {
let expected = if pick.current == Some(id) {
Unavailability::default()
Unpickable::default()
} else {
Unavailability {
Unpickable {
banned: banned.contains(&id),
taken_by_ally: taken.contains(&id),
not_offered: [64, 5, 68].contains(&id),
}
};
assert_eq!(pick.unavailability(id), expected, "champion {id}");
assert_eq!(pick.unpickable(id), expected, "champion {id}");
}
}