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

Show block inserter to the left of empty paragraphs. #5478

Merged
merged 8 commits into from
Mar 12, 2018

Conversation

mtias
Copy link
Member

@mtias mtias commented Mar 7, 2018

This seeks to improve the usability of adding content other than text. It also removes the ellipsis menu for empty paragraphs under the assumption that it adds unnecessary noise.

Once the user types anything, both the movers and menu reappear.

It also bumps the number of items in the quick-shortcuts area to 3 given the inserter has moved.

image

@mtias mtias added [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Mar 7, 2018
@mtias mtias requested review from youknowriad, jasmussen and aduth March 7, 2018 14:56
@mtias mtias force-pushed the add/inserter-to-the-left-on-empty-p branch from d0013e2 to feb50d8 Compare March 7, 2018 15:02
@mtias mtias added this to the 2.4 milestone Mar 7, 2018

.editor-block-list__empty-block-inserter {
position: absolute;
top: 10px;
Copy link
Member

Choose a reason for hiding this comment

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

Small screen:

image

@@ -11,6 +11,39 @@ $empty-paragraph-height: $text-editor-font-size * 4;
outline: 1px solid $light-gray-500;
}
}

.editor-inserter-with-shortcuts {
Copy link
Member

Choose a reason for hiding this comment

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

Not sure what of it is related to changes here, but default inserter does some unexpected things at smaller viewports:

image

@aduth
Copy link
Member

aduth commented Mar 7, 2018

Columns with default appender and the new half-opacity:

image

@@ -603,7 +604,7 @@ export class BlockListBlock extends Component {
rootUID={ rootUID }
layout={ layout }
/>
{ shouldShowMovers && (
{ shouldShowMovers && ! showSideInserter && (
Copy link
Member

Choose a reason for hiding this comment

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

Seems like ! showSideInserter ought to be built-in to the condition assigning to shouldShowMovers, if we're expecting them to be mutually exclusive (prevents future errors where this is not accounted for).

@mtias
Copy link
Member Author

mtias commented Mar 7, 2018

We need more space for these columns :) @jasmussen thoughts?

@mtias
Copy link
Member Author

mtias commented Mar 7, 2018

Simplified mobile to be:

image

@jasmussen
Copy link
Contributor

This is 🔥

Can you add border-radius: 50%; to .editor-inserter__toggle so we get this?

screen shot 2018-03-08 at 09 14 12

How are you doing the mobile stuff? I'm still seeing this:

screen shot 2018-03-08 at 09 17 04

Also, there's a fair bit of right margin on mobile breakpoints.

Given that we have a desire to revisit the side UI for both mobile and nested — it's on my todo list but is blocked on #5217 — perhaps I can look at improving those things separately from this PR, so we don't hold these improvements up from shipping.

@mtias
Copy link
Member Author

mtias commented Mar 8, 2018

@jasmussen is that with the latest changes? It looks like shown above to me: #5478 (comment)

@aduth
Copy link
Member

aduth commented Mar 9, 2018

The issue with the InserterWithShortcuts not inserting correctly in the default appender was because it was built to replace a block, not append to the block list. Since in the default block appender there's no block to replace, I've updated it in 68829c1 to support inserting.

@mtias mtias force-pushed the add/inserter-to-the-left-on-empty-p branch 2 times, most recently from 924cfb3 to f37a25b Compare March 12, 2018 12:27
mtias and others added 8 commits March 12, 2018 13:29
This seeks to improve the usability of adding content other than
text. It also removes the ellipsis menu for empty paragraphs under
the assumption that it adds unnecessary noise.

Once the user types anything, both the movers and menu reappear.

It also bumps the number of items in the quick-shortcuts area to 3.
@mtias mtias force-pushed the add/inserter-to-the-left-on-empty-p branch from f37a25b to bf439ad Compare March 12, 2018 12:30
@jasmussen
Copy link
Contributor

This is what I'm seeing:

placeholder

I think this is great. 👍 👍

Mobile:

mobile

Looks good too. It's slightly weird with the plus to the right on mobile, and the plus in the top left inserter. I feel like we may be able to do with just the latter, especially since the toolbar is sticky and the mobile viewport is so small. But no objections, though, good to ship 👍 👍

@mtias mtias merged commit fc26eb7 into master Mar 12, 2018
@mtias mtias deleted the add/inserter-to-the-left-on-empty-p branch March 12, 2018 12:53
@StaggerLeee
Copy link

You did it. Looks great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants