Uh oh!
There was an error while loading. Please reload this page.
refactor(plugin-detail): extract <InlineFieldInput> from DetailSection (#2407 step 0) - #2529
Merged
Merged
Conversation
#2407) Lift the inline-edit input branch out of DetailSection into a standalone, reusable <InlineFieldInput> component — objectui#2407 step 0, the behavior-preserving refactor that precedes the record-level InlineEditContext and editable-highlights work (each a separate follow-up PR). <InlineFieldInput> renders the exact same type-aware editors the detail body handled inline: SelectField, BooleanField, LookupField, UserField, CapabilityMultiSelectField, the permission-facet-link read-only facet, and the plain number/date/text input (ISO-date coercion + $expand-ed reference safety so an object value never leaks "[object Object]"). DetailSection delegates to it and keeps the field-editability gate (computed / readonly / system-field / object-lifecycle) unchanged; extractLookupId + TEXTUAL_REF_FALLBACK_TYPES move alongside the component and are re-imported. This lets any record-level surface (the details body and the highlights strip) share one editor, shrinking the surface of the follow-up editable-highlights change. Verified: plugin-detail type-check + vite build clean; 191 tests pass (19 files), incl. the existing DetailSection inline-edit suites, the record-details save/OCC path, and a new InlineFieldInput parity test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y1f7TvqYMo41g9RbQ6H2od
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 15, 2026 15:11
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Jul 15, 2026
os-zhuang added a commit
that referenced
this pull request
Jul 16, 2026
…aft (#2549) objectui#2407 P2 (final phase). Makes the highlights strip editable in place, sharing ONE draft + ONE atomic Save with the details body. HeaderHighlight consumes useInlineEdit() (hover-pencil/double-click enters the shared session; renders the same InlineFieldInput as the body; computed/readonly/system highlights expose no editor; compact-layout expand-on-edit). RecordDetailView (app-shell) hosts ONE InlineEditProvider spanning record:highlights + record:details plus the single record-level InlineEditSaveBar; record:details drops its P1-local provider/bar and consumes the shared context; record:highlights threads the DataSource through. Guardrails preserved: computed/readonly/system non-editable, canEdit gate, OCC ifMatch + ConcurrentUpdateDialog, only-edited-keys. Verified: 205 tests (22 files) incl. a new HeaderHighlight editable suite; plugin-detail type-check + vite build clean; app-shell type-check clean w.r.t. this change. Browser-verified in real Chromium (harness mirroring the app-shell provider structure): double-click a highlight → whole record enters edit → a highlight edit + a body edit commit together in exactly ONE update({budget,health},{ifMatch:v1}); computed highlight exposes no editor. Completes #2407 across step 0 (#2529) + P1 (#2542) + P2.
This was referenced Jul 16, 2026
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 freeto 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.
What & why
Follow-up to #2402, first PR of #2407 ("Record-level inline edit: editable highlights + one atomic Save"). That issue is deliberately split into three sequential PRs; the maintainer's execution note asks to land step 0 — the behavior-preserving
<InlineFieldInput>extraction — first, because it is already covered by the #2402DetailSectioninline-edit tests and shrinks the surface of the later editable-highlights work.This PR is exactly that step 0. It contains zero UX/behavior change — it only lifts the inline-edit input branch out of
DetailSectioninto a standalone, reusable component so any record-level surface (the details body and, later, the highlights strip) can render one identical editor.Changes
InlineFieldInput.tsx(new)DetailSection. Renders the same type-aware editors:SelectField,BooleanField,LookupField,UserField,CapabilityMultiSelectField(#2403), thepermission-facet-linkread-only facet (#2403), and the plain number/date/text<input>(ISO-date coercion +$expand-ed reference safety so an object value never leaks"[object Object]").extractLookupId+TEXTUAL_REF_FALLBACK_TYPESmove here.DetailSection<InlineFieldInput>; re-importsTEXTUAL_REF_FALLBACK_TYPESfor its editability gate. The gate itself (computed /readonly/ system-field / object-lifecycle) and the surroundingmin-hwrapper are unchanged, so the rendered DOM is identical.index.tsxInlineFieldInput(+InlineFieldInputProps,extractLookupId,TEXTUAL_REF_FALLBACK_TYPES).InlineFieldInput.test.tsxparity suite (widget routing,$expand-ed reference & object-value safety, ISO date round-trip, auto-focus).The input widget only is extracted; the editability gating stays with the host —
<InlineFieldInput>renders the editor only once the host has decided a field is editable.Guardrails preserved
Computed (
formula/summary/rollup/auto_number) +readonly+ system fields expose no editor; object-lifecycle gate unchanged; OCC / partial-update save path (record:details→DetailView) untouched. Pure refactor — no save-semantics change (that is P1).Verification
plugin-detailtype-check clean, vite build ✓ (declarations emitted).DetailSection.inlineEdit/DetailSection.doubleClickEditsuites, therecord-detailsinline-save + OCC-conflict test (which drives the full save path through the extracted component), and the newInlineFieldInputparity test.Next (separate PRs, per #2407)
InlineEditContext+ one atomic OCC save;DetailView(page + standalone) delegates; delete its local batch save. Highlights stay read-only.<InlineFieldInput>.🤖 Generated with Claude Code
Generated by Claude Code