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

Block: side inserter in Popover #19406

Merged
merged 1 commit into from
Jan 9, 2020
Merged

Block: side inserter in Popover #19406

merged 1 commit into from
Jan 9, 2020

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Jan 4, 2020

Description

This PR moves the "side inserter" to the block controls popover.
It also consistently places it on the right side. Currently we place it on the right side on mobile and in nested context, but on the left on wide screens if the block is at the root. See #19045 (comment).

Either we should consistently place it on the right side, or we could consider moving it to the left side but within the block boundary. I picked the first option because we're already doing that on mobile and for nested paragraphs. If needed, we can explore the inside-left option separately.

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .

@ellatrix ellatrix added the [Status] In Progress Tracking issues with work in progress label Jan 4, 2020
@ellatrix ellatrix removed the [Status] In Progress Tracking issues with work in progress label Jan 6, 2020
@jasmussen
Copy link
Contributor

Great work reducing the markup!

You raise a good question: what do we do about the plus button in an empty paragraph?

Here's how it looks on desktop when not nested:

Screenshot 2020-01-06 at 12 48 23

Here's the same, just inside a group:

Screenshot 2020-01-06 at 12 48 46

As you note, the latter is also the case on mobile.

Recently, the "recent blocks" shortcuts were removed, which make the remaining discrepancy all the more visible. In effort to keep things moving, and because we can always revisit, I would suggest it's okay to show the plus on the right, everywhere. And if something comes up, or if a better idea emerges from #18667, we can revisit!

@jasmussen
Copy link
Contributor

Related: #10519

@ellatrix
Copy link
Member Author

ellatrix commented Jan 9, 2020

Let's merge and explore more ideas. Another solution could be to show the inserter next to the caret on the right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants