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

Only dispatch START_TYPING if not already typing #629

Merged
merged 1 commit into from
May 3, 2017

Conversation

aduth
Copy link
Member

@aduth aduth commented May 3, 2017

Currently typing within a text block is very noisy in dispatching Redux actions, since it is bound as the onKeyDown event handler for the block wrapper. We only need to dispatch the typing start action if the block state selectedBlock.typing value is not currently true for the current block.

Before After
Before After

Testing instructions:

It's easiest to test Redux DevTools Chrome extension. Verify that when typing in a text block, there's only a single START_TYPING action dispatched. Ensure that no regressions occur to the behavior affected by typing started (controls disappear).

@aduth aduth added the [Feature] Blocks Overall functionality of blocks label May 3, 2017
@aduth aduth requested a review from youknowriad May 3, 2017 15:37
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

Good quick win 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants