-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update all ConfirmDialog
s in the codebase to be size=medium
#62532
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +75 B (0%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
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.
This change looks okay. I did have a comment on a known deprecated component though.
@@ -77,6 +77,7 @@ export default function PostSwitchToDraftButton() { | |||
onConfirm={ handleConfirm } | |||
onCancel={ () => setShowConfirmDialog( false ) } | |||
confirmButtonText={ confirmButtonText } | |||
size="medium" |
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.
Separate from this PR, but I don't think this component is surfaced in the UI anymore (it's deprecated)?
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.
Good catch - I've removed the change from that component in 48469a2
…ess#62532) * Update all `ConfirmDialog`s in the codebase to be size=medium * Don't update deprecated dialog ---- Co-authored-by: talldan <[email protected]> Co-authored-by: nerrad <[email protected]> Co-authored-by: annezazu <[email protected]>
* Update all `ConfirmDialog`s in the codebase to be size=medium * Don't update deprecated dialog ---- Co-authored-by: talldan <[email protected]> Co-authored-by: nerrad <[email protected]> Co-authored-by: annezazu <[email protected]>
* Update all `ConfirmDialog`s in the codebase to be size=medium * Don't update deprecated dialog ---- Co-authored-by: talldan <[email protected]> Co-authored-by: nerrad <[email protected]> Co-authored-by: annezazu <[email protected]>
I just cherry-picked this PR to the wp/6.6-beta-3 branch to get it included in the next release: 434e5c4 |
* Update all `ConfirmDialog`s in the codebase to be size=medium * Don't update deprecated dialog ---- Co-authored-by: talldan <[email protected]> Co-authored-by: nerrad <[email protected]> Co-authored-by: annezazu <[email protected]>
What?
Closes #62524
Adds
size="medium"
to theConfirmDialog
s shown across gutenberg.Why?
Lots of the
ConfirmDialog
usage across the codebase is very inconsistent. The dialog expands to the width of the text content, so some are very big, some are very small.How?
Add
size="medium"
to anywhere we useConfirmDialog
.It could also be added to the base component as an opinionated size, though it would be a breaking change.
There are unfortunately a lot of modals that look like a
ConfirmDialog
in the codebase, but are actually reimplementing it. I haven't hunted every one down. I don't plan to completely address this issue, just make a reasonable attempt at bringing some consistency.Also, some of the
ConfirmDialog
s that I changed I couldn't find a way to trigger. I don't think it's a big issue, this just changes themin-width
.Testing Instructions
Screenshots or screencast