feat(12.1-02): read-only preview screen with a status hint and record actions
- config_form.yaml preview block (optional headerPartial), reported in the form schema as preview
- fields with context: preview show only on the preview screen and are never written
- form messages preview and edit; recordActions without a preview block stops boot
- SPA route {id}/preview, PreviewView and PreviewField, record actions in the footer
- mapWinterUrl maps preview/:id; the update form returns to the preview
- summer-callout partial style classes for status hints
- README, docs, OpenAPI document, TS types and the embedded build updated
This commit is contained in:
@@ -12,7 +12,8 @@ import { renderPartialNodes } from './partialNodes'
|
||||
// The first load shows a skeleton; a reload (reloadKey change) keeps the
|
||||
// current nodes visible and only marks the host busy. Zero nodes render
|
||||
// nothing; a failure shows the extension failure box. No live region: the
|
||||
// toast of the action that caused a reload is the announcement.
|
||||
// toast of the action that caused a reload is the announcement. A reload
|
||||
// that fails keeps nothing: the failure box replaces the content.
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
source: ControllerParams
|
||||
@@ -22,8 +23,10 @@ const props = withDefaults(
|
||||
variant: 'header' | 'field'
|
||||
/** Bumped by the parent to refetch. */
|
||||
reloadKey?: number
|
||||
/** A status hint (preview screen): the first load shows one 68px block. */
|
||||
hint?: boolean
|
||||
}>(),
|
||||
{ recordId: null, reloadKey: 0 },
|
||||
{ recordId: null, reloadKey: 0, hint: false },
|
||||
)
|
||||
|
||||
const nodes = ref<PartialNode[] | null>(null)
|
||||
@@ -66,7 +69,7 @@ void load()
|
||||
<div v-else-if="nodes === null" data-partial-loading aria-busy="true">
|
||||
<div
|
||||
data-partial-skeleton
|
||||
:class="variant === 'header' ? 'h-[80px] w-full rounded-card' : 'h-[44px] w-full rounded-control'"
|
||||
:class="hint ? 'h-[68px] w-full rounded-inner' : variant === 'header' ? 'h-[80px] w-full rounded-card' : 'h-[44px] w-full rounded-control'"
|
||||
class="bg-skel"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user