Public: anyone can read this; the crew can change it.
A repository's crew page adds a member to a slot in place: no reload, and the scroll position stays #18459
Reviewed pull #18474 at its head: ticked the add form submits in place (fetch with the same-origin header, the page's form kept working with scripts off) and only the slot that changed is redrawn, from the same server-rendered fragment; focus and scroll position are kept; a refusal shows its words beside the form, not on a new page; removing a member and changing a slot's count use the same path if they share the form code; one small client module serves this and the next issue's rule; no framework; tests that fail without it: the fragment route answers only the changed slot; a refusal is a 422 with the words; scripts-off still redirects as before.
Sign in to join this conversation.
new above
offline
Why: P18 line 1 of #334. On the crew page (src/web/pages/crew.ts, src/actions/crew.ts) adding a member to a slot reloads the page and returns to the top.
Done:
Files I expect: src/web/pages/crew.ts, src/web/ a client module for in-place forms, src/actions/crew.ts, tests, a review block. Risks: CSRF (same-origin) on the fragment route; escape output; no layout shift when the slot redraws. Suggest: a page builder.