Skip to content
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

#30930 - Make it easier to select "Edit visually" when in "Edit as HTML #41516

Merged
merged 7 commits into from Jun 21, 2022

Conversation

adambasa-dp
Copy link
Contributor

What?

Make it easier to select "Edit visually" when in "Edit as HTML" mode #30930

Why?

#30930

@adamziel @carolinan

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Jun 2, 2022
@github-actions
Copy link

github-actions bot commented Jun 2, 2022

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @adambasa-dp! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

Copy link
Contributor

@adamziel adamziel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing!

The react native test failures seem unrelated, I just restarted them. Other than what @ZebulanStanphill noticed, this PR looks great to me. Let's update that name and get it merged!

@adamziel
Copy link
Contributor

adamziel commented Jun 6, 2022

The failed checks looks like flaky tests to me, I just restarted them

@ZebulanStanphill ZebulanStanphill added [Package] Block editor /packages/block-editor [Feature] Blocks Overall functionality of blocks labels Jun 7, 2022
@@ -20,6 +21,7 @@ export function BlockSettingsMenu( { clientIds, ...props } ) {
/>
) }
</ToolbarItem>
<BlockEditVisuallyButton clientIds={ clientIds } { ...props } />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally got around to actually trying out this PR. It works fine, but I now see that the button appears after the ellipsis. Shouldn't it be placed before it?

image

Besides that, this PR is good to go.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZebulanStanphill I did it according to the design from that issue #30930

IMHO it's ok, but we can change the order

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also suggest putting the button before the ellipsis (with a divider between) to avoid breaking a widespread UI convention.

@carolinan carolinan added the Needs Design Feedback Needs general design feedback. label Jun 10, 2022
@adamziel
Copy link
Contributor

Code LGTM. I see @carolinan requested design feedback, let's wait for it before merging.

@adambasa-dp
Copy link
Contributor Author

OK, I've just changed order of those buttons

@jameskoster
Copy link
Contributor

It works well, but I think a divider between the button and the ellipsis would help make this toolbar consistent with all others in the editor canvas.

@adambasa-dp
Copy link
Contributor Author

@jameskoster sure, I've just added a divider

@jameskoster
Copy link
Contributor

Hmm I'm not seeing it 🤔

Screenshot 2022-06-20 at 16 51 33

@adambasa-dp
Copy link
Contributor Author

That's strange...
image

Copy link
Contributor

@jameskoster jameskoster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore me, I didn't have the latest. It's working now :)
Screenshot 2022-06-20 at 17 00 16

Comment on lines 19 to 24
const { isBlockMultiSelected, getBlockMode, getBlock } = select(
blockEditorStore
);
const isSingleSelected = ! isBlockMultiSelected(
firstBlockClientId
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current unit test failure is caused by the recent update to wp-prettier in trunk. (See #40542.)

Here's what the reformated code should look like:

Suggested change
const { isBlockMultiSelected, getBlockMode, getBlock } = select(
blockEditorStore
);
const isSingleSelected = ! isBlockMultiSelected(
firstBlockClientId
);
const { isBlockMultiSelected, getBlockMode, getBlock } =
select( blockEditorStore );
const isSingleSelected =
! isBlockMultiSelected( firstBlockClientId );

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since that's the last required change and it's just code formatting, I went ahead and clicked "commit"

…-edit-visually-button.js

Co-authored-by: Zebulan Stanphill <zebulanstanphill@protonmail.com>
@adamziel adamziel merged commit acf70c0 into WordPress:trunk Jun 21, 2022
@adamziel
Copy link
Contributor

🎉 Congratulations on your first merged PR @adambasa-dp !

@github-actions
Copy link

Congratulations on your first merged pull request, @adambasa-dp! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts:

https://profiles.wordpress.org/me/profile/edit/

And if you don't have a WordPress.org account, you can create one on this page:

https://login.wordpress.org/register

Kudos!

@github-actions github-actions bot added this to the Gutenberg 13.6 milestone Jun 21, 2022
@femkreations femkreations added the Needs User Documentation Needs new user documentation label Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository Needs Design Feedback Needs general design feedback. Needs User Documentation Needs new user documentation [Package] Block editor /packages/block-editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants