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

Find and replace replace all & undo #13892

Closed
kbinieda opened this issue Apr 17, 2023 · 2 comments · Fixed by #14685
Closed

Find and replace replace all & undo #13892

kbinieda opened this issue Apr 17, 2023 · 2 comments · Fixed by #14685
Assignees
Labels
intro Good first ticket. package:find-and-replace package:undo squad:features Issue to be handled by the Features team. type:bug This issue reports a buggy (incorrect) behavior. type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@kbinieda
Copy link
Contributor

Currently, find-and-replace replace all feature does not work well with undo feature, that is a single undo step rollbacks only one change instead of all changes.

That makes scenarios with lots of changes hard to rollback, ex. 1k changes with single replace all click will need 1k undo clicks to rollback to previous state.

Steps to reproduce:

  1. Use find-and-replace replace all command on any manual test with a keyword that returns multiple results.
  2. Try to rollback the changes using undo button.
@kbinieda kbinieda added type:improvement This issue reports a possible enhancement of an existing feature. package:undo type:refactor This issue requires or describes a code refactoring. package:find-and-replace labels Apr 17, 2023
@Reinmar Reinmar added type:bug This issue reports a buggy (incorrect) behavior. and removed type:refactor This issue requires or describes a code refactoring. labels Apr 17, 2023
@mlewand
Copy link
Contributor

mlewand commented Apr 17, 2023

Fixing it should be as simple as wrapping _replace() call in replace all command with a model.change() call that will batch it into one transaction.

@mlewand mlewand added the intro Good first ticket. label Apr 17, 2023
@Ruman-Al
Copy link

I don't know how to use replace all.because as I am implemented it didn't do anything.can you show me the implementation.

@mlewand mlewand added the squad:features Issue to be handled by the Features team. label Jul 27, 2023
@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Jul 27, 2023
@pszczesniak pszczesniak self-assigned this Jul 28, 2023
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Jul 28, 2023
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Jul 28, 2023
Dumluregn added a commit that referenced this issue Jul 28, 2023
…lace-all-and-undo

Fix (find-and-replace): Undo should restore every text occurrences replaced by replace all in the document at once. Closes #13892.
@CKEditorBot CKEditorBot added this to the iteration 66 milestone Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intro Good first ticket. package:find-and-replace package:undo squad:features Issue to be handled by the Features team. type:bug This issue reports a buggy (incorrect) behavior. type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants