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

Writing Flow: Redirect click below editor to last text field #5541

Merged
merged 2 commits into from
Mar 14, 2018

Conversation

aduth
Copy link
Member

@aduth aduth commented Mar 10, 2018

Supersedes #5493

This pull request seeks to apply some of the ideas from #5493, albeit at a more limited scope. It seeks to turn the entire block list column into a clickable text target, effectively equivalent to the default block appender spanning the entire viewport height of the editable canvas. In the process, it reverts #5199; when the last block is a text block, clicking below the text editor moves the text caret to the last block aligned at the X coordinate of the click. This should feel very familiar to the experience of a word processor like Google Docs.

The behavior is complemented well by #5417, where clicking into and out of the default appended block is quite seamless.

As with #5493, the effect is difficult to describe, and is better experienced live.

Given the revert of #5199, this does conflict with the proposed goals of #5478, where with these changes we cannot assume that the default block appender will always be present at the end of content.

Testing instructions:

Verify that clicking below the last block appends a new text block if the last block is not already a paragraph block.

If the last block is a paragraph block, verify that clicking below the block aligns the text caret corresponding to the X coordinate of the click.

Verify that you can still clear the selected block by clicking to the left or right of the area below the block list (where the cursor changes from cursor: text to cursor: default).

Repeat above instructions in various viewport sizes† and content length.

† The effect doesn't work at small viewports, because the editor does not occupy the full height until reaching 600px or wider because of this style. We should consider how we can otherwise allow the editor to occupy the full height on small viewport sizes. I expect "click below to clear" currently doesn't work either, in master.

@aduth aduth added the [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... label Mar 10, 2018
@aduth aduth requested a review from a team March 10, 2018 00:05
@aduth aduth added this to the 2.4 milestone Mar 10, 2018
@jasmussen
Copy link
Contributor

This is really really really nice. 👍 👍 🔥

It vastly enhances what we hoped to achieve with the trailing inserter, and makes it much more editor like.

@aduth aduth force-pushed the update/writing-flow-eoc branch from 507998d to de0cf1c Compare March 12, 2018 13:07
@aduth
Copy link
Member Author

aduth commented Mar 12, 2018

Rebased after merge of #5478 (cc @mtias ). Still feels pretty good. Only main difference is lack of border on default block appender makes hover-able area less obvious. UI also feels slightly heavier with constant presence of the frecent block options.

@aduth aduth force-pushed the update/writing-flow-eoc branch from de0cf1c to 7ad57b5 Compare March 14, 2018 00:27
@aduth aduth merged commit 530a66e into master Mar 14, 2018
@aduth aduth deleted the update/writing-flow-eoc branch March 14, 2018 00:34
@noisysocks
Copy link
Member

It looks like this causes the default block appender to not show when editing nested blocks, see #5228 (review).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants