-
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
Add a minimal multi-selection block panel #12050
Conversation
Code wise, it looks good. My concern is that we repeat |
Let me try and push a little change. |
I love it 👍 |
|
||
function MultiSelectionInspector( { blocks } ) { | ||
return ( | ||
<div className="editor-block-inspector__card"> |
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.
Instead of reusing a className, I'd just duplicate this style in a style.scss
file specific to this component and rename this class editor-multi-selection-inspector__card
.
Later, we should think at a generic card component or something.
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.
The other classNames should also be renamed.
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.
The other classNames should also be renamed.
Which ones? Did I miss any?
Thanks for the tweaks 👍 |
Forgot one, that I just pushed. I'll need help changing the tab label, though — so it always says "Block". |
There's still some things we can remove :) I'm pushing a commit |
1a34599
to
edfd969
Compare
I tweaked the last commit, we just need a ✅ now :) |
@gziolo, you're up! :D |
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.
Looks great, thanks for addressing my comment and adding more visual tweaks. I like that we use this icon to look more similar to the regular block 👍
{ sprintf( __( '%d blocks' ), blocks.length ) } | ||
</div> | ||
<div className="editor-multi-selection-inspector__card-description"> | ||
{ sprintf( __( '%d words.' ), wordCount( serialize( blocks ), 'words' ) ) } |
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 needs to use _n()
instead of __()
. Also, there is no translators comment.
} showColors /> | ||
<div className="editor-multi-selection-inspector__card-content"> | ||
<div className="editor-multi-selection-inspector__card-title"> | ||
{ sprintf( __( '%d blocks' ), blocks.length ) } |
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 needs to use _n()
instead of __()
. Also, there is no translators comment.
Addresses an issue introduced in #12050.
Created #12054 to fix this. |
Addresses an issue introduced in #12050.
Let's avoid the "coming soon" message in the RC and replace the multi-selection inspector panel with a minimal panel with some numbers.