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

Group field edits together for undo/redo #4952

Merged
merged 1 commit into from
Jun 29, 2021
Merged

Conversation

NeilFraser
Copy link
Contributor

Fixes #4189.
Also use 0 instead of 0px, in accordance with the rest of Blockly and Google’s CSS style guide.

Fixes #4189.
Also use 0 instead of 0px, in accordance with the rest of Blockly and Google’s CSS style guide.
@BeksOmega BeksOmega linked an issue Jun 28, 2021 that may be closed by this pull request
Copy link
Collaborator

@BeksOmega BeksOmega left a comment

Choose a reason for hiding this comment

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

LGTM, and procedure renaming works correctly again!

One non-code question: do you think that the custom field docs should be updated to include info about how to handle event grouping properly? It looks like outside developers need to handle this themselves because the group needs to be killed when their arbitrary widget closes.

@NeilFraser
Copy link
Contributor Author

If developers of custom fields (that aren't descendants of textinput) don't do anything, then they will simply get a lot of ungrouped events, so it is safe. They can reduce the spam by adding Blockly.Events.setGroup(true); in their equivalent of widgetCreate_ and a matching Blockly.Events.setGroup(false); in their equivalent of widgetDispose_. But it is optional (core Blockly was missing this for about a year).

@NeilFraser NeilFraser merged commit 33ad244 into develop Jun 29, 2021
@NeilFraser NeilFraser deleted the fraser-bugbash5 branch June 29, 2021 16:57
@rachel-fenichel
Copy link
Collaborator

Since it's release week, we should have held off on merging. I think we should revert it and hold for a week.

@NeilFraser
Copy link
Contributor Author

Reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fields don't group edits
3 participants