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

Try adding focus outline for blocks that don't have input fields #3951

Merged
merged 5 commits into from Dec 13, 2017

Conversation

Projects
None yet
3 participants
@jasmussen
Contributor

jasmussen commented Dec 12, 2017

This probably fixes #3560 and maybe fixes #1829.

When you select a block, we show outlines for that block. When you then start writing, those outlines and all the controls fade out, letting you focus on the text. But when you then use arrowkey navigation to move between blocks and encounter a block that has no textfield, there's no indication what's selected. This is nicely illustrated in #3560.

This PR tries to address that, by showing an indicator on blocks that have no input fields. And so in absence of a caret cursor to indicate your place, there's now an outline:

block-indicator

In addition to highlighting your place in the block list, this is also useful in indicating that you can press Enter to make a linebreak, or press Delete or Backspace to delete the indicated block.

jasmussen added some commits Dec 8, 2017

Try isEditing focus
This PR is an experiment to add a focus style for blocks have focus when using just the keyboard. It is experimental right now, but it could potentially provide a nicer editing flow, by showing what's selected when your caret disappears and a block is instead selected. Obviously when that happens you can press delete or backspace to remove said block, or you can press enter to make a linebreak.

@jasmussen jasmussen self-assigned this Dec 12, 2017

@jasmussen jasmussen requested review from karmatosed and youknowriad Dec 12, 2017

@youknowriad

I personally like this change, might be good to have a second opinion.

@jasmussen

This comment has been minimized.

Show comment
Hide comment
@jasmussen

jasmussen Dec 13, 2017

Contributor

I pushed a tiny tweak to the indicator style:
caret position

Contributor

jasmussen commented Dec 13, 2017

I pushed a tiny tweak to the indicator style:
caret position

@mcsf mcsf referenced this pull request Dec 13, 2017

Merged

Writing Flow: 'Down' key at bottom creates new paragraph #3973

0 of 3 tasks complete
@jasmussen

This comment has been minimized.

Show comment
Hide comment
@jasmussen

jasmussen Dec 13, 2017

Contributor

🎉

Contributor

jasmussen commented Dec 13, 2017

🎉

@jasmussen jasmussen merged commit a9fcdfd into master Dec 13, 2017

3 checks passed

codecov/project 39.76% (+1.52%) compared to 360467b
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@jasmussen jasmussen deleted the try/is-editing-focus branch Dec 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment