feat(detail): editable record highlights on the shared inline-edit draft (#2407 P2)#2549
Merged
Conversation
…aft (#2407 P2) Make the highlights strip editable in place, sharing ONE draft + ONE atomic Save with the details body (builds on P1 #2542 InlineEditContext + step-0 #2529 InlineFieldInput). objectui#2407 P2. - HeaderHighlight consumes useInlineEdit(): hover-pencil + double-click enter the shared record edit session; each editable highlight renders the same <InlineFieldInput> the body uses (value = draft[name] ?? data[name], write via setField). Computed/readonly/system highlights expose no editor; empties are kept while editing; an actively-edited column widens + renders the editor full-width (Salesforce-style expand-on-edit). - RecordDetailView (app-shell) hosts ONE <InlineEditProvider> (canEdit = object-lifecycle gate) spanning record:highlights + record:details, plus the single record-level <InlineEditSaveBar> — so a highlight edit and a body edit commit together in ONE update(obj, id, draft, { ifMatch }). - record:details drops its P1-local provider/save bar (would split the draft) and consumes the shared context; record:highlights threads the DataSource through for lookup/user editors. Guardrails preserved: computed/readonly/system highlights non-editable; canEdit gate; OCC ifMatch + ConcurrentUpdateDialog; only edited keys sent. Verified: plugin-detail type-check + vite build clean; app-shell type-check clean w.r.t. this change (only the pre-existing @objectstack/formula sandbox error remains); 205 tests pass (22 files) incl. a new HeaderHighlight editable suite. Browser-verified in real Chromium: double-click a body field -> highlights strip becomes editable -> edit a highlight (budget) + a body field (owner) -> exactly ONE update carrying BOTH keys + ifMatch -> edit exits, no JS errors. 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
|
# Conflicts: # packages/app-shell/src/views/RecordDetailView.tsx
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
What & why
P2 (final phase) of #2407 — builds on step 0 (
<InlineFieldInput>, #2529) + P1 (InlineEditContext+ atomic save, #2542). Makes the highlights strip editable in place, sharing ONE draft + ONE atomic Save with the details body. This completes the issue's goal: the most edit-worthy fields (Status / Budget / End Date / …) are now inline-editable, and a highlight edit + a body edit commit together.Changes
HeaderHighlightuseInlineEdit(). Hover-pencil + double-click enter the shared record edit session; each editable highlight renders the same<InlineFieldInput>the body uses (value = draft[name] ?? data[name], write viasetField). Computed (formula/summary/rollup/auto_number),readonly, and system fields expose no editor. Empty highlights are kept while editing so they can be filled. Compact-layout UX: an actively-edited column widens to the "wide" basis and renders the editor full-width (Salesforce-style expand-on-edit).RecordDetailView(app-shell)<InlineEditProvider canEdit={affordances.edit}>spanning bothrecord:highlightsandrecord:details, plus the single record-level<InlineEditSaveBar>(sticky) — so highlight + body edits commit together in ONEupdate(obj, id, draft, { ifMatch }). This is the provider lift P1 deferred.record:detailsInlineEditProvider/InlineEditSaveBar(a nested provider would split the draft from the highlights) and just consumes the shared context.record:highlightsDataSourcethrough toHeaderHighlightfor lookup/user editors.Guardrails preserved
Computed /
readonly/ system highlights are non-editable;canEditobject-lifecycle gate; OCC (ifMatch+ConcurrentUpdateDialog); the atomic update carries only user-edited keys. The legacy (non-schema)DetailViewpath is untouched (it never had inline edit).Verification
plugin-detailtype-check + vite build clean;app-shelltype-check clean w.r.t. this change (only the pre-existing, unrelated@objectstack/formulasandbox module error remains — not touched here).HeaderHighlighteditable suite: read-only without a provider; double-click enters the shared session; computed highlight exposes no editor; a highlight edit lands in the shared draft;canEdit=falseoffers no editor.update('project','p1', {budget:'88000', owner:'Bob'}, {ifMatch:'v1'})carrying both keys → edit exits; no JS errors. (Screenshot shared with the maintainer.)Acceptance criteria (P2)
Notes for review
🤖 Generated with Claude Code
Generated by Claude Code