Expose the seams a bundle needs to own the draft editing surface - #3988
Draft
markus-moser wants to merge 2 commits into
Draft
Expose the seams a bundle needs to own the draft editing surface#3988markus-moser wants to merge 2 commits into
markus-moser wants to merge 2 commits into
Conversation
Additive only — nothing renders or behaves differently. Two SDK exports (useEditFormContext, useSaveContext) plus use-save-schedules: a bundle replacing the `saveButtons` slot entry needs the same form and save state the core buttons read. Without them the only way to drive a save from a bundle is to reach into the editor's DOM, which is exactly what having a slot was meant to avoid. One new slot, dataObject.editor.editTab.topBar, rendered beside DraftAlert. A bundle that owns pending edits has somewhere to announce them, instead of portalling onto a testid. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
markus-moser
force-pushed
the
feat/draft-ui-extension-points
branch
from
August 13, 2026 08:22
9722b53 to
e87e4aa
Compare
|
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.



Additive only. Nothing renders or behaves differently until something registers.
Package B, PR 1 of 2. Unblocks the draft-aware save buttons in the changeset bundle.
What
Three SDK exports —
useEditFormContext,useSaveContext(data-object barrel) anduse-save-schedules(element barrel).A bundle replacing the
saveButtonsslot entry needs the same form and save state the core buttons read.useSaveis already exported, but the payload comes fromgetModifiedDataObjectAttributes()onuseEditFormContext, which is not — so today the only way to drive a save from a bundle is to reach into the editor's DOM, which is precisely what having a slot was meant to avoid.One new slot —
dataObject.editor.editTab.topBar, rendered besideDraftAlertinroot-component.tsx, empty by default.DraftAlertis hardcoded intorenderTopBar, so a bundle that owns pending edits has nowhere to announce them short of portalling onto a testid. The slot is the seam; core does not learn who fills it.Verification
tsc --noEmit— 0 errorseslinton all four touched files — cleanjest— 35 suites, 355 tests, all passingNotes
Consumed by the changeset bundle to replace the change-set footer, which today shows "Save & Publish" for saves that are captured onto a branch and publish nothing. Field decorations (the other extension point that work needs) are deliberately not in this PR.