Anchor decisions review to next row and use a fixed flash toast #132
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/decisions-review-scroll-ux"
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?
What does this PR do?
Two friction points in rapid sequential decision review, reported from operating the
/decisionsqueue.Scroll retention. After an approve/reject the full-page redirect returned the viewport to the top of a long queue, so the operator had to scroll back to their place. Each decision row now carries
id="decision-{id:N}"and the inline review forms'returnToanchors to the next still-reviewable row (self when it is the last, no fragment when none), so the redirect lands on the row acted on next. The fragment passesSafeReturnPath(leading/, no//or CRLF) and survives the step-up redirect.scroll-margin-topkeeps the anchored row clear of the top so the just-reviewed badge stays visible; aprefers-reduced-motion-gatedtr:targethighlight marks it.Layout shift. The success banner shifted the list when it collapsed its box after a few seconds.
FlashBanneris now a fixed, out-of-flow.flash-toast(top-centre,role="status"), so neither its appearance nor its dismissal moves content. Success toasts fade on opacity only after 6s and pause on hover/focus; errors persist; a manual dismiss button and a reduced-motion variant are included. The shared global.messageused by inline notices across Configuration, DecisionDetail, and Account is left unchanged; the toast overrides its animation locally.Progressive enhancement lives in
wwwroot/js/list-review.js(focus the anchored row withpreventScroll, wire the dismiss button, guard against a double submit). Everything degrades to server behaviour with scripting off, consistent with the static-SSR posture and thescript-src 'self'CSP.This is UX polish over the prior inline-review change; no new decision record.
How was this tested?
dotnet build Viegard.slnx- 0 errors, 0 warningsdotnet test(AdminApi) - 225 pass, including a new test asserting a fragment-bearingreturnTosurvives the review redirectChecklist
Rapid sequential decision review had two friction points. After an approve/reject the full-page redirect returned the viewport to the top of a long queue, and the success banner shifted the list when it collapsed its box after a few seconds. Scroll retention: each decision row now carries id="decision-{id:N}" and the inline review forms' returnTo anchors to the next still-reviewable row (self when last, no fragment when none), so the redirect lands on the row the operator acts on next. The fragment passes SafeReturnPath and survives the step-up redirect. scroll-margin-top keeps the anchored row clear of the top; a reduced-motion-gated tr:target highlight marks it. Layout shift: FlashBanner is now a fixed, out-of-flow .flash-toast (top-centre, role=status), so neither its appearance nor its dismissal moves content. Success toasts fade on opacity only after 6s and pause on hover/focus; errors persist; a manual dismiss button and a reduced-motion variant are included. The shared global .message used by inline notices elsewhere is left unchanged. Progressive enhancement in wwwroot/js/list-review.js focuses the anchored row with preventScroll, wires the dismiss button, and guards against a double submit; everything degrades to server behaviour with scripting off. Docs updated (AGENT-README Changes, ARCHITECTURE admin description). Added a test asserting a fragment-bearing returnTo survives the review redirect. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>