github quazardous/qdadm @quazardous/qdadm@2.47.0

2 hours ago

Minor Changes

  • 6d50781: Small additions a newcomer had to write by hand (#4687). QdPending shows a retry button next to "Unavailable" when it has a :read (:retry="false" drops it). useAsyncRead(loader, { key }) reads again from scratch when the key changes, so the previous record's answer never shows under the next one. A run takes a meta (kept across a reload), and the runner finds it again: tasks.runFor(kind, meta | taskId), tasks.runsFor({ kind, taskId, meta }). MockApiStorage takes latency (ms, or [min, max]) and failRate to behave like a remote server.
  • 57c8420: Fixes from a blind-agent audit (#4685).
    • With the debug bar on, a hook or signal payload holding a cycle (a manager that keeps its I18n) no longer makes every save fail: qdadm no longer turns on the event kernel's own tracing, which JSON-stringified each payload.
    • Declared columns are shown: ListPage renders addColumn / generateColumns() columns when the page gives no #columns slot, cells by field type, with a #column-<field> slot per cell. generateColumns({ exclude, only }) is new.
    • A record's breadcrumb crumb, and a child page's Details link, open its show page when there is one, rather than its form.
    • Docs: task readers (step, result, error), the child form's parent key (disabled, not hidden), defaultSortOrder (-1), permissions as grants and isOwn instead of role tests, zones in Module classes, the demo README.
  • a8fed31: The i18n that docs/i18n.md promised, done (#4686). Entity labels come from entities.<entity>.label / labelPlural (titles, breadcrumbs, menus), select options from entities.<entity>.fields.<field>.options.<value> (forms, show pages, list cells, static filters), booleans from core.values.yes / no. The default action labels (list create button and row tooltips, show page Edit / Delete / Back, form Save / Delete / Cancel), ListPage's "Actions" header and the search placeholder follow a locale change without a remount. The chosen locale is kept across reloads, per app (i18n.rememberLocale: false turns it off). The form's default save label now follows the mode: "Create & Close" / "Update & Close".
  • 747a9cf: i18n left over after the first blind audit (#4692). A filter without a placeholder shows its field's label from the catalogue, and its empty choice reads "All " (core.filters.all), both following the locale; static options now get that empty choice too (not when they hold a null option, nor with allLabel: false). Show and form actions take label: () => string, read at each render. A run's label may be a function, read each time it shows (tray, dialog, end toast). Docs: a child crud's tab reads the child's labelPlural unless label pins it.
  • 8eb2975: A module brings its own grants (#4694): ctx.grant(role, permissions) in connect() adds default grants to the roles provider (persistable or static), so a feature needs no edit to the app's main.js. A role saved from the Roles screen with createLocalStorageRolesProvider (or trackDefaults: true on a persistable provider) now records the defaults it saw (defaults_snapshot): on the next load it keeps its own list plus the defaults added since, while a grant the user removed stays removed. Saves from before keep their list as it is.
  • 5d3c610: Waiting states for asynchronous reads (#4665). useAsyncRead(loader) returns { data, error, loading, ready, pending, load }: loading from the start, data undefined until the first answer (null and [] are answers), ready after the first success, pending for a gesture's :disabled, the latest call wins, and a failure stops the wait and keeps the last good data. QdPending is a neutral spinner badge until its value is read (a muted "Unavailable" when the read fails), QdPendingZone an area with a skeleton or a spinner, a readable error with Retry, and a dimmed content while it reads again. Both take the composable as :read, set aria-busy, and stand still under prefers-reduced-motion.
  • cf835b7: A show-page action says where it goes (#4693): placement: 'header' | 'footer' on addAction({ … }); by default edit goes to the header and the rest to the footer, as before. Docs and the module template now teach today's shapes: MockApiStorage latency / failRate, the _template module (Module class, EntityManager, catalogue, list/show/form), the credo's module, where a call that is not one record lives (a manager method), where a module's own strings go, and runFor's limits.
  • 1a6e3bd: Tasks on a record's page (#4695). TaskRunStatus shows a run in a line: its status (the dialog's words and colours), progress and step while it runs, the error once it failed, a #result slot once it succeeded, Follow to reopen its dialog, and "Not run yet" without a run. tasks.isActive(run) tells a run still going. The follow dialog, modal, now closes when the user goes to another page and the run goes on in the tray; dialog: { keepOnNavigate: true } keeps it open.

Patch Changes

  • a7da1b7: Option labels in lists (#4686 follow-up): a static filter's options now translate (they looked up the entity's label, not its name, and always missed), and a severity tag shows the option's translated label instead of the raw value.

Don't miss a new qdadm release

NewReleases is sending notifications on new releases.