Ring a card of Your details that holds a change not yet saved (#927) #1078
No reviewers
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo!1078
Loading…
Reference in a new issue
No description provided.
Delete branch "927-unsaved-cards"
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?
Your details is one form of a dozen cards, and the guard of #258 knew only
that the form held something unsaved, not where. app.js now marks the card:
data-card-unsavedon it, which app.css draws as a soft amber outlineoutside its border (amber 600 in the light theme, 3.06:1 against the page;
500 in the dark, 9.4:1), a "Not saved" badge in the amber tone in its title,
and a dot on its entry in the section menu with the same words for a screen
reader. The words come from a in the page, so they are translated
with it; nothing is announced, because the badge is text the card is read
with.
A card is changed while any named field in it differs from what the page was
loaded with (defaultValue, defaultChecked, the default option of a menu, a file
box holding a file), so undoing a change takes the mark off; saving is a new
page and takes every mark off. A refused save draws the page with what was
typed, so the view lists the fields it brought back changed (the form's and
each block's changed_data) and those cards are marked on load until saved.
The attribute is not
data-unsaved, which settleGuard looks for anywhere in aform (#656). The ring is an outline because forced colours keep an outline and
drop a box-shadow; the dot is painted CanvasText there. app.css names no
Basecoat class: the rules key on the attributes.
Closes #927
Notes for review
data-card-unsaved, a 2px amber outline (an outline survives forced colours), a "Not saved" badge in its heading or legend, and an amber dot in the section menu, with "Not saved" as hidden text. There is no live announcement.data-unsaved: it is avoided on purpose, becausesettleGuarduses it for the save-as-you-go fields.changed_data) are markedrefusedand stay marked until a save.🤖 Generated with Claude Code
057ba9d03ed799d2cda7