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

Rich Text: Remove createUndoLevel for split, merge #7650

merged 3 commits into from Jul 3, 2018


None yet
3 participants

aduth commented Jun 30, 2018

#4956 (comment)

This pull request seeks to optimize RichText by removing the creation of undo levels at split and merge steps. These have the adverse effect of causing the field's onChange callback to be called needlessly.

These changes introduce new, very basic end-to-end tests to verify against regression in undo behaviors on splitting.

Testing instructions:

Verify there are no regressions in splitting or merging blocks (e.g. paragraph), and that undo-ing still has the desired effect.

Ensure end-to-end tests pass:

npm run test-e2e

This comment has been minimized.


jorgefilipecosta commented Jul 2, 2018

This is testing well for me on the split case. On the merge case, I think we still need a correction.
I did the following:
Created a paragraph with some content.
Pressed enter many times to create many empty paragraphs.
I deleted some paragraphs by pressing backspace.
I verified we need to press undo multiple times to undo each block deletion.

This behavior is not a regression It is the same way in master.


This comment has been minimized.


aduth commented Jul 2, 2018

@jorgefilipecosta Given that the behavior is the same in master, cool if we file an issue and tackle separately, merging this one as-is?


I did not notice any regression and the changes look good 👍


This comment has been minimized.


iseulde commented Jul 3, 2018

Looks good to me too.

@aduth aduth merged commit 66581eb into master Jul 3, 2018

2 checks passed

codecov/project 46.99% (+0.01%) compared to a89f21e
continuous-integration/travis-ci/pr The Travis CI build passed

@aduth aduth deleted the remove/rich-text-create-undo-level-split-merge branch Jul 3, 2018

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