Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

feat: remove unnecessary bypass for URL inputs on link editor #279

Merged
merged 2 commits into from
Sep 11, 2020

Conversation

thenanyu
Copy link
Collaborator

@thenanyu thenanyu commented Sep 10, 2020

required to address outline/outline#1527

event.preventDefault();
event.stopPropagation();
const prevIndex = this.state.selectedIndex - 1;

this.setState({
selectedIndex: Math.max(0, prevIndex),
selectedIndex: Math.max(-1, prevIndex),
Copy link
Member

Choose a reason for hiding this comment

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

Why change this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it changes the key semantics of the search box to be similar to google (as well as many other search / type-ahead interfaces), where pressing up at the top item puts you back into the editor.

The world is about 50-50 on this behavior but the products that think about UI more intently generally do it this way IMO. It feels right to me

@thenanyu thenanyu changed the title remove unnecessary bypass for URL inputs on link editor feat: remove unnecessary bypass for URL inputs on link editor Sep 11, 2020
@tommoor tommoor merged commit e40a832 into develop Sep 11, 2020
@delete-merged-branch delete-merged-branch bot deleted the dont-bypass-urls branch September 11, 2020 04:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants