Repository navigation
feat(plugin-detail): fold a kept all-empty record section, and an all-empty body (objectui#13386) - #13483
Merged
Conversation
…body (objectui#13386) Ruling C on objectui#13386: in read-only mode an all-empty section that is kept (hideEmpty false, or omitted where no default resolves it) draws its heading plus one "Show N empty fields" row, the toggle a partly-filled section uses, instead of a column of em-dashes. Edit mode and print pages draw every row, as before. A body whose sections are all empty folds once more into one row (objectui#12618 item 2). Claude-Session: https://claude.ai/code/session_01AqaieDWuDnBRyh3u8epGx6 Co-authored-by: Claude <noreply@anthropic.com>
…tui#13386) Claude-Session: https://claude.ai/code/session_01AqaieDWuDnBRyh3u8epGx6 Co-authored-by: Claude <noreply@anthropic.com>
…update pins (objectui#13386) The body fold reads every section above the per-section error boundaries, so a malformed section now turns it off instead of throwing and blanking the body. Pins that read an all-empty section's rows now reveal the fold first. Claude-Session: https://claude.ai/code/session_01AqaieDWuDnBRyh3u8epGx6 Co-authored-by: Claude <noreply@anthropic.com>
…ui#13386) Claude-Session: https://claude.ai/code/session_01AqaieDWuDnBRyh3u8epGx6 Co-authored-by: Claude <noreply@anthropic.com>
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contributor
Author
席位核对 — ACCEPT · PR #13483 @
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Elon · project thread
Fixes #13386
Fixes #12618
Seat: domain:ui#4 · card thread
session_01AqaieDWuDnBRyh3u8epGx6· claim 6391455338Ruling-ref: 6369306878 (batch #7 item 4, letter C)
Clause-②: no · Metadata-protocol: semantic (the spec side landed as objectstack-ai/objectstack#25612)
What changes
Ruling C: in read-only mode an all-empty section that the page keeps draws its heading plus ONE "Show N empty fields" row, the same toggle a partly-filled section uses, instead of one em-dash row per field. Edit mode is unchanged, and a body whose sections are all empty folds once more (item 2 of #12618).
DetailSection, all-empty section kept (hideEmpty: false, or omitted where no default resolves it), read-onlyNo valuerow per fieldhideEmpty: trueall-empty sectionDetailViewsections) where every section is empty and at least two are keptEmptySectionsFold); revealing it draws each section folded on its ownNo key, shape or default moved, and no new i18n key: both rows reuse
detail.showEmptyFields/detail.hideEmptyFields. ThehideEmptydescriptions in@object-ui/types(DetailViewSection,RecordDetailsSection, the zod mirror) and the two@object-ui/plugin-detailregistration texts now say what a kept section draws.Readings taken (for the seat's review)
hideEmpty: false. Ondetail-view, thedetail-sectionnode and therecord:detailsdirect-fieldsfallback, omitted already meant the same asfalse(keep), and their descriptions said so. The fold keeps them equal, so the test is "kept" (!hideAllEmptySection), not=== false. Onrecord:detailsauthored sections nothing changes for an omitted key: it still resolves?? trueand hides.Show 4 empty fields(en),显示 4 个空字段(zh). No new string.sectionGroups) turn the body fold off, as they draw fields of their own beside the sections. A malformed section (no field array, or a read that throws) turns it off too, so each section still renders or fails inside its own boundary (plugin-detail: an authoredsections[].groupTHROWS and takes every sibling section down (both the spec's and this renderer's own docs predict a silent no-op), and an enumeratedsections[].fieldsresolves labels only through the i18n bundle — with none, every app shows raw field names #8497).Tests
packages/plugin-detail/src/__tests__/DetailSection.allEmptyFold-13386.test.tsx— the 「交易说明」 fixture: heading + one "Show 4 empty fields" row and no em-dash; reveal and fold back; untitled section;hideEmpty: truecontrol; edit mode draws four textboxes and no fold; print page prints four rows; mixed sections (small and large) unchanged; body fold counts 8 over three sections, reveals each section folded, folds back; controls for a filled field anywhere, a single kept section, edit mode and print page;emptySectionsFoldCountrules including malformed sections.DetailSection.tsxat base, 6 of the new file's cases go red (the edit-mode, print, mixed and count cases stay green, as they pin unchanged behaviour).record-details.hideEmptyRetired-71294/4(b),record-details.emptySectionDefault(falsekeeps; direct-fieldsfallback),detailSectionAuthoredHideEmpty-10485, the AMPLIFICATION cases ofDetailSection.emptyArray-8474andDetailSection.emptinessAuthority-8376(now: the fold counts all four rows, so the empty value is not counted as filled),inlineCredentialGate(signature's empty sample reveals the fold before reading the pencil),record-details.unresolvedIdentityFailClosed-9054(the legacyfieldNameentry survives as "Show 1 empty field").Verification (local)
pnpm exec vitest run packages/plugin-detail/ packages/types/— green after the pin updates (the first full run surfaced the six pins above; their files re-run green: 132 passed).pnpm --filter @object-ui/plugin-detail type-check,pnpm --filter @object-ui/types type-check— clean.pnpm --filter @object-ui/plugin-detail lint— 0 errors.check:new-line-citations0 new ·check:doc-json·check:doc-fences·check:control-bytes·check:i18n-keys·check-changeset-presence— pass.node scripts/check-governed-queue-guard.mjs --test <diff>— NOT GOVERNED.check:doc-snippets/check:doc-examples(need the whole build; CI runs them). NOT MEASURED: screenshots of the HotCRM opportunity record at 1280 px (Record page: a section whose fields are all empty folds like the others instead of showing dashes #12618 acceptance 2), reason: no HotCRM console stack in this container; the 「交易说明」 case is pinned in the DOM test above.Acceptance notes
The
hideEmptydescribe text on the installed spec pin still carries the pre-#25612 wording; the next pin move picks up the ruled text. Nothing here reads that prose.Adds no product-specific widget, dialog, hook or string (see AGENTS.md › Product-neutral renderer)
🤖 Generated with Claude Code
https://claude.ai/code/session_01AqaieDWuDnBRyh3u8epGx6