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

Rich Text: Remove createUndoLevel for split, merge #7650

Merged
merged 3 commits into from
Jul 3, 2018

Conversation

aduth
Copy link
Member

@aduth 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

@aduth aduth added [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Performance Related to performance efforts labels Jun 30, 2018
@jorgefilipecosta
Copy link
Member

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.

@aduth
Copy link
Member Author

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?

Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

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

@ellatrix
Copy link
Member

ellatrix commented Jul 3, 2018

Looks good to me too.

@aduth aduth merged commit 66581eb into master Jul 3, 2018
@aduth aduth deleted the remove/rich-text-create-undo-level-split-merge branch July 3, 2018 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Performance Related to performance efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants