-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add unsaved changes warning to widgets screen #26081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Size Change: +129 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
|
There's a separate issue in #26084 I noticed in working on this, particular changes don't trigger the warning. The update button is also affected by this, so I'm considering it a separate bug to this change. |
tellthemachines
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially this component could be moved to block-editor to remove the duplication?
I don't have context on why the editor package is not meant to be used here. But UnsavedChangesWarning uses core selectors so wouldn't be suitable for moving to block-editor as is. Probably best to duplicate for now, and revisit later if it becomes a problem 😅
This works well!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this comment still make sense in the current context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, updated 😄
2c6e60f to
9053f47
Compare
packages/edit-widgets/src/components/layout/unsaved-changes-warning.js
Outdated
Show resolved
Hide resolved
packages/edit-widgets/src/components/layout/unsaved-changes-warning.js
Outdated
Show resolved
Hide resolved
d6c2512 to
bca1838
Compare
Description
Closes #26076.
Adds the
UnsavedChangesWarningcomponent to the widgets screen.I've copied this component from the
editorpackage, since the widgets screen has no dependency oneditor(see #25859).Potentially this component could be moved to
block-editorto remove the duplication?How has this been tested?
Screenshots
Types of changes
New feature (non-breaking change which adds functionality)
Checklist: