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

State: Batch updates to title (and other post properties) for undo #5553

Merged
merged 3 commits into from
Mar 14, 2018

Conversation

aduth
Copy link
Member

@aduth aduth commented Mar 10, 2018

Closes #4057
Related: #4956

This pull request seeks to apply the same undo buffering introduced in #4956 for blocks to apply to all post property updates. This particularly impacts the post title, where the changes proposed here will improve undo to apply to aggregate of the changes applied to the title, rather than a single character at a time.

In the process, the KeyboardShortcuts component has been updated to accept children to which keyboard events should be monitored. This was proposed as a future enhancement in the original implementation (#1944).

Due to issues with React controlled textareas (facebook/react#8514), key events for undo/redo must be monitored manually within the title, and redirected as dispatching actions to the editor store.

Testing instructions:

Verify that when entering a title, pressing Undo no longer reverts one character at a time, but rather all changes made in sequence.

This same behavior applies to any other post property change (e.g. status, author, etc).

@aduth aduth added the General Interface Parts of the UI which don't fall neatly under other labels. label Mar 10, 2018
@aduth aduth force-pushed the update/title-undo branch from 0a1481a to 2d10dc1 Compare March 14, 2018 00:44
@aduth aduth force-pushed the update/title-undo branch from 2d10dc1 to 98d7efd Compare March 14, 2018 01:01
@aduth aduth merged commit 1f6d7ee into master Mar 14, 2018
@aduth aduth deleted the update/title-undo branch March 14, 2018 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant