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

Introduced batch sub-types #11009

Merged
merged 7 commits into from
Jan 11, 2022
Merged

Introduced batch sub-types #11009

merged 7 commits into from
Jan 11, 2022

Conversation

scofalik
Copy link
Contributor

@scofalik scofalik commented Dec 15, 2021

Suggested merge commit message (convention)

Feature: Replaced Batch#type with a set of flags: isUndoable, isLocal, isUndo, isTyping which better represent the batch type. Batch constructor and Model#enqueueChange() now expect an object. Closes #10967.

Fix (typing): Fixed editor crash when an unrecognized transformation was given in configuration (as a string).

Other (typing): Typing feature will now create batches with isTyping set to true.

Other (undo): Undo feature will now create batches with isUndo set to true.

BREAKING CHANGE (engine): Batch#type has been removed. Use Batch#isUndoable, #isLocal, #isUndo and #isTyping instead.

BREAKING CHANGE (typing): Input#isInput() has been removed. Use Batch#isTyping instead.

MINOR BREAKING CHANGE (engine): String value for Batch type and Model#enqueueChange() is now deprecated. Using string value will log a warning in the console. Use an object value instead. For more information, refer to the API documentation.

…Local`, `isUndo`, `isTyping` which better represent the batch type. `Batch` constructor and `Model#enqueueChange()` now expect an object.

Fix (typing): Fixed editor crash when an unrecognized transformation was given in configuration (as a string).
Other (typing): Typing feature will now create batches with `isTyping` set to `true`.
Other (undo): Undo feature will now create batches with `isUndo` set to `true`.

MINOR BREAKING CHANGE: String value for `Batch` type and `Model#enqueueChange()` is now deprecated. Using string value will log a warning in the console. Use an object value instead. For more information, refer to the API documentation.
.map( transformation => TRANSFORMATIONS[ transformation ] || transformation )
.filter( transformation => typeof transformation === 'object' ) // Filter out transformations set as string that has not been found.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

An existing test started to fail after the batch changes has been introduced. This was a fix that was needed. It seems that previously, the test was a false positive.

@scofalik scofalik requested a review from niegowski January 7, 2022 14:44
@scofalik scofalik merged commit 83538a8 into master Jan 11, 2022
@scofalik scofalik deleted the ck/10967 branch January 11, 2022 10:37
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.

Introduce batch sub-types
2 participants