Rework the site navigation, the account page, the Game page and My games #400
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
spec
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amaurycoudr/chess-project#400
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem Statement
After accounts v1 (#364, !523), four screens work but read badly. The owner's verdict, from #399: the problem is layout and hierarchy, not the look.
Solution
A design pass on the four screens, chosen from a throwaway prototype in the running app (branch
prototype/399-front-screens). The chosen variants are navigation D, account page C, Game page C and My games D.Everything is presentation except one contract change.
game.listgains a result filter, a cursor and per-result counts.account.megainshasGames, so the navigation still asks the server one thing per page.User Stories
Navigation
Account page
Game page
My games
Everywhere
Seams
hasGames, the Guest note, the account menu, Language, the phone bar, and that/and/localstill ask nothing butaccount.me.AccountPageViewwith the auth harness and MSW (front view test). Covers 15–28 and their French copy.GamePageViewwith the games harness (front view test). Covers 29–34 and their French copy.MyGamesViewwith the games harness and MSW serving the newgame.list(front view test). Covers 35–46 and their French copy.game.listandaccount.meprocedures through RPC against a real database (API integration). Covers the server half of 4–5, 8, 39 and 41: the cursor, the result filter, the counts andhasGames, for a Guest, for an Account, and for a browser with neither.apps/e2e(e2e). Extendsmy-games.specto reach My games from the navigation after a Game and filter it (5, 39). Adds one test toaccounts.specthat reaches the account page from the Username menu and deletes the Account through the dialog (10, 22, 26).Implementation Decisions
Contract and API (the one behaviour change)
game.listtakes an optionalresult(won|lost|drawn, from the caller's side) and an optional opaquecursor. It answers one page newest first,nextCursorwhen more remain, and the caller's counts per result across all their Games, regardless of the filter. This replaces today's bare array capped at 50.account.meanswershasGames: booleanbesidekind, for a signed-out browser (true when its Guest owns a Game) and for an Account. A claimed Guest's Games count as the Account's (ADR 0035).Front
app/, with the account part in theauthvertical; the Game page and My games stay ingames. Each screen keeps one.view.tsxholding the hooks and one.ui.tsxholding the layout.Sidebar, added todesign-system/ui. It is 256px wide on desktop, with a sticky header, content and footer. Belowlgit gives way to a slim top bar, with no menu sheet. The settings cog is removed; Language moves into the account menu, or beside Sign in for a Player with no Session.account.me. "My games" is shown whenhasGamesis true, and nothing else is fetched.hasGamesis true. It links to sign-up, which already claims the Guest.section:profile|data|delete, defaultprofile). So is My games' filter (result, absent meaning all). Both are written through TanStack Router; view state that a link should carry belongs in the URL.Dialog. The password field and the refusal message move inside it, and the deletion itself is unchanged.result, built by thegamesvertical's query-options factory (ADR 0012). The counts come from the first page.Merge requests
game.listpage, filter and counts, andaccount.me'shasGames. (S5)Testing Decisions
.ui.tsx(frontCODING_STANDARDS). They assert what a Player perceives: roles, accessible names, text, URL.app-shell.test.tsx: sidebar and phone-bar layout, language switch.router.test.tsx:/and/localask nothing but who is signed in. It must stay green unchanged.account-page.test.tsx: details, download, deletion refusals and success, French.game-page.test.tsx.my-games.test.tsx.rpc-account-games.integration.test.tsandrpc-game-reads.integration.test.ts:game.listas a Guest and as an Account.my-games.spec.tsandaccounts.spec.tsinapps/e2e.hasGamesfalse for a browser with no Guest and no Session.sectionorresultsearch parameter outside the allowed values falls back to the default.Out of Scope
Further Notes
prototype/399-front-screens(never merged). Runpnpm devand use the floating "Prototype #399" panel.?nav=D,?page=Con/accountand/games/<id>, and?page=D&many=1on/gamesshow the chosen variants.Sidebarproportions; the Lichess analysis layout; GitHub's account deletion.CODING_STANDARDS.mdhere.marked this issue as related to #399
mentioned in issue #399
mentioned in issue #401
mentioned in issue #402
mentioned in issue #403
mentioned in issue #404
mentioned in issue #405
marked this issue as related to #401
marked this issue as related to #402
marked this issue as related to #403
marked this issue as related to #404
marked this issue as related to #405
mentioned in merge request !527
mentioned in commit
801eee8c75mentioned in commit
584b8ec1aementioned in commit
93aae90d64mentioned in commit
c0a41f20b6mentioned in commit
58d7de47c7mentioned in commit
86bf5c9957mentioned in commit
7abece0947mentioned in commit
484481eebe