Repository navigation
Conversation
…t save `session.edits`, set with `setEdit`, is undoable and cleared by Reset because `isDirty` counts it, but `hasOutputEdits` does not, the editor's unsaved-changes check and Save ignore it, and neither the save hook nor the modal's modifier builder reads it. Say so in the architecture notes, the doc comments and at `hasChanges`, and pin it with a state test, so a sidebar panel reaching the session knows what setting one does before the session is exposed to plugins. Applying named edits to the output is the edit pipeline's job and a separate change.
🤖 PR meta 🤖📦 Bundle sizeSize Change: 0 B Total Size: 9.06 MB
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Regression: updating a specific option will only change its value and will not corrupt others in
|
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
Names what a named edit is today:
session.edits, set withsetEdit, is session state for the editor's own edit pipeline, not an extension API. Architecture notes, doc comments, one comment at the editor's unsaved-changes check, and a test that pins it. No behaviour change.Why
A sidebar panel (#84664) can reach the session. If it called
setEdit, Reset would enable but Save would not, the discard prompt would not fire, and nothing would be saved:isDirtycounts named edits,hasOutputEditsdoes not, and neither the save hook nor the modal's modifier builder reads them. That has to be stated where the next reader looks before the session is exposed to plugins. Applying named edits to the output is the edit pipeline's job and a separate change.What changed
architecture.mdsays what a named edit is and is not.edits,setEditandhasOutputEditssay the same.hasChangessays why named edits are left out: counting them would enable Save for a change the save then drops.