Your details: a section with unsaved changes is ringed in soft orange #927
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#927
Loading…
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?
On Your details, a section with changes that have not been saved gets a soft orange glow around its border until the page is saved or the changes are undone.
What exists today
static/js/app.js, under "not losing what was typed" (#258):markDirtysetsform.dataset.dirty = "1"on the firstinputorchangeinside a POST form, andbeforeunloadasks before leaving. Dirtiness is per form, and Your details is one form (<form method="post" enctype="multipart/form-data">intemplates/accounts/profile.html) holding every card. Nothing records which card changed, and nothing is drawn on the page.data-unsavedwhile unsaved. That is a per-field mark on other pages, not used here.<div class="card" id="section-…">and<fieldset class="card" id="section-…">inside[data-cards].What would change
data-unsavedon the.card). When every field in it is back to its loaded value, the mark comes off. Compare withdefaultValue,defaultCheckedanddefaultSelected; a file input counts while it holds a file. Save clears every mark. A refused save draws the page again with the changes still unsaved, so mark those cards again on load.ring-2 ring-amber-400/50, and an equivalent in dark mode), inassets/css/app.css. The amber tone is already used for "kept as it was" warnings.Accessibility
class="badge" data-tone="amber"), or at least a visually hidden sentence. The ring must clear 3:1 against the page (SC 1.4.11) in both themes.Notes
Related: #258, #656.
Checked against
mainat56fc9d531.