-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Editor: Resolve Publish button busy state styling regression #16303
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
376a229
Components: Avoid assigning default styling if explicitly primary
aduth 0ae1e9b
Editor: Remove redundant assignment of publish button as large
aduth 91f7f0a
Components: Add CHANGELOG entry for busy styling fix
aduth cc9a755
Components: Always apply is-default class if isDefault prop passed
aduth f58d253
Components: Add test case to protect regression on isPrimary, isLarge…
aduth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Components: Avoid assigning default styling if explicitly primary
- Loading branch information
commit 376a2293dede26ceae2e24cfd7a55e3c79a2af84
There are no files selected for viewing
This file contains 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
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.
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.
Would the condition
isDefault || ! isPrimary && ( isLarge || isSmall )
also work? I guess when someone passesisDefault
there is an expectation the is-default class is added for sure. Otherwise, maybe we can add a small note on https://github.com/WordPress/gutenberg//blob/dd9bf47ff07680d672efc5b31abac268e2cb69c0/packages/components/src/button/README.md#L128 saying the prop is ignored if isPrimary prop is also passed.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.
Hm, well, the root of the problem is that nobody should ever apply both
isPrimary
andisDefault
, so your expectation may be valid in consideringisDefault
alone, but not in combination withisPrimary
.That being said, your suggestion still seems like a slight improvement in sensibly mapping
isDefault
andisPrimary
to their respective classes, irrespective the styling conflict which would likely ensue from this choice.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.
Updated in cc9a755.