-
v0.44.0 Stable
released this
2026-11-20 23:01:14 +00:00 | 7 commits to main since this releaseChanged
FormandRecordFormno longer move focus or announce the error count
on everyfieldErrorsorissueschange. A submit's response always
focuses and announces; otherwise only errors not there before do: for Form
afieldErrorsentry that differs from the previous one for that field,
for RecordForm an issue object the previousissueslacked. Clearing one
field's issue while the user types, or passing a rebuilt array of the same
issues, no longer pulls focus away or interrupts with an assertive
announcement.
Added
PanelGroup(PUI-10), exported as
@[secure]/ui/components/PanelGroup.vue, joins the Panels inside it into one
bordered surface: each Panel drops its own border, radius and background,
keeps its title above its fields, and a divider separates consecutive
visible Panels, skippinghiddentab panels. It renders a plain<div>
with only a default slot and adds no role, so the Panels keep their section
and heading semantics. A Panel around an editable BlockEditor keeps the
panel padding inside the group, so its blocks don't touch the group border.
Panels outside a PanelGroup and the field look are unchanged.Repeater(@[secure]/ui/components/Repeater.vue) edits an array of like
rows withv-model(PUI-112), replacing hand-built row lists. The app
suppliescreate()for new rows and each row's content through therow
slot; rows carry a key (id, oritemKey). Each row is a fieldset named by
rowLabel(row, index), "Item n" by default, with its fields in one grid
that wraps on narrow screens. Up and down buttons move a row and Remove
deletes it at once, both announced, with focus following the row; Add
focuses the new row's first control, andminandmaxdisable Remove and
Add at the limit.issuestake full paths, withpathnaming the list
in them, and each issue object stays with the row it was first filed under
through adds, removes and moves, so filtering issues out or rebuilding the
array keeps the rest on their rows; a removed row's issues stop showing in
the list, though the caller'sissuesstill hold them. Rows whose keys are
empty or repeated log a warning. With
apath, the list and each row fieldset are named by their path, and a row
with issues of its own is marked invalid.
Wording is in the newrepeatermessages section, English and Dutch.RecordFormandRecordFieldstake alistfield,{ type: 'list', name, label, fields, create, itemKey?, min?, max?, rowLabel?, addLabel? }, built
on Repeater. Row fields use paths relative to the row and render as the
built-in controls (any type exceptlistandcustom), named by their
full path, sorevealFieldand RecordForm's focus reach an invalid row
field, and an issue on a row itself (['social_links', 1]) focuses that
row. RecordForm's focus also finds a row that moved after its issue
arrived.RecordListRowFieldis exported fromRecordForm.types. The
error summary is unchanged.useRecordForm(@[secure]/ui/composables/useRecordForm) owns a
RecordForm's load and save (PUI-113), replacing the revision counter and
the hand-written busy, baseline and failure code of each form page. It
returnsmodel,baseline,dirty(isEqualRecord),loading,
loadError,busy,issues,errors,submit(input),reload(),
reset(),clearIssues(path)andbind, which
<RecordForm v-bind="form.bind" :fields>spreads for the model, baseline,
issues, errors, busy and the submit, update andfield-changelisteners.
clearIssues, thefield-changelistener, drops the issues at the changed
path and its parents (the field's row and list) and keeps the other issue
objects, so the rest stay on their rows and move no focus.loadruns at
setup and onreload(), settingloadingandbusy; without it, or when
it returnsundefined, the form starts frominitial, a value being
copied so model edits never reach it. A record resolved bysavereplaces model and baseline,
otherwise the submitted input becomes the baseline; a failure fills
issuesanderrorsthroughformFailure(error, failure). The latest
result wins:reload()and unmounting make a running load or save stale,
a stale result changes nothing, andsubmitwhile busy is ignored.
onLoaded(record)andonSaved(record)run for current results only. It
announces nothing and leavesuseUnsavedChangesto the page. Theform
messages gainloadFailedandsaveFailed, the fallbacks when the error
is not anErrorand nofailureis given.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads