[IMP] model: allow to batch commands in one history step #4077
+93
−85
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[IMP] model: allow to batch commands in one history step
We sometime need to create a UI plugin specifically to handle a command
so that its sub-commands are batched in a single history step.
This is kind of a problem when working with stores, because then we
need both a store to handle all the business logic, and a plugin that
handle a command created specifically to batch sub-commands (looking
at you find & replace).
We can fix that easily by creating a local command
BATCH_COMMANDS
that take a callback as argument, and that batches every command
and sub-command executed in the callback within one history step.
Task: 3870119
[IMP] f&r: remove find & replace plugin
Now that we can batch commands, the plugin find & replace
is now useless.
Task: 3870119
review checklist