Skip to content

Promote find replace dialog to production#20641

Merged
david-allison merged 4 commits intoankidroid:mainfrom
lukstbit:feat_promoteFindReplaceDialog
May 7, 2026
Merged

Promote find replace dialog to production#20641
david-allison merged 4 commits intoankidroid:mainfrom
lukstbit:feat_promoteFindReplaceDialog

Conversation

@lukstbit
Copy link
Copy Markdown
Member

@lukstbit lukstbit commented Mar 31, 2026

Purpose / Description

This was discussed and I think we should do it.

From the linked issue:

  • left a TODO for the ui improvements
  • the ViewModel can and will come at a later point

Later edit: wondering if we should add to the dialog a warning about the (potential) destructive effects of using the dialog.

Fixes

How Has This Been Tested?

The dialog appears without having to enable the dev setting.

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@lukstbit lukstbit added this to the 2.24 release milestone Mar 31, 2026
@lukstbit lukstbit force-pushed the feat_promoteFindReplaceDialog branch from c8d35e6 to 44f655b Compare March 31, 2026 13:33
@ZornHadNoChoice
Copy link
Copy Markdown
Collaborator

ZornHadNoChoice commented Mar 31, 2026

Later edit: wondering if we should add to the dialog a warning about the (potential) destructive effects of using the dialog.

I agree, it's fine even if there's a second confirmation dialog since it's not something you do often.

But just to confirm: those effects would be due to user error, like using .* regex, right?

@lukstbit
Copy link
Copy Markdown
Member Author

lukstbit commented Apr 1, 2026

I was thinking more about a warning label for the user about creating a backup using #20644. If the user does this he has a restore point independent of the undo queue and I think it would be enough. I wouldn't oppose a dialog asking to confirm the use of a regex, but I don't like the multiple dialogs stacking(I'm not happy at all when navigating the custom study dialogs stack).

See:

Screenshot from 2026-04-01 11-13-39

@david-allison
Copy link
Copy Markdown
Member

Could we defer this to 2.25?

This is a fair risk to add in at the start of the beta cycle

@lukstbit
Copy link
Copy Markdown
Member Author

lukstbit commented Apr 4, 2026

Could we defer this to 2.25?

Sure. I added it because it was requested :)
But if we add the backup menu option and the notice above, we kind of did enough to provide users with safety IMO.

Copy link
Copy Markdown
Contributor

@criticalAY criticalAY left a comment

Choose a reason for hiding this comment

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

Looks clean, thankyou

@criticalAY criticalAY added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Apr 4, 2026
@david-allison
Copy link
Copy Markdown
Member

Sure. I added it because it was requested :)

Ahaa, sorry about that, too close for comfort now. Definitely want to give this one a good soak in alpha

@BrayanDSO BrayanDSO added the Next version Changes to be merged in the next version, to keep the current release stable. label Apr 5, 2026
@BrayanDSO BrayanDSO added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Apr 5, 2026
@lukstbit lukstbit removed this from the 2.24 release milestone Apr 6, 2026
@lukstbit lukstbit added the Needs Author Reply Waiting for a reply from the original author label Apr 13, 2026
@lukstbit lukstbit force-pushed the feat_promoteFindReplaceDialog branch 2 times, most recently from f5015a2 to 4b0b293 Compare April 20, 2026 11:15
@lukstbit
Copy link
Copy Markdown
Member Author

Besides the original code, I added two more changes:

  • a warning in the dialog like in the image above
  • an entry for TR.browsingFindAndReplace in TR.sentenceCase and used that instead

@lukstbit lukstbit added Strings and removed Needs Author Reply Waiting for a reply from the original author Has Conflicts labels Apr 20, 2026
This menu option will be available for both states in browser:
- when the user didn't select anything -> 'Selected notes only' will be disabled
- when the user selected something -> 'Selected notes only' will be available to be toggled
Inform the user that he could/should do a backup.
@lukstbit lukstbit force-pushed the feat_promoteFindReplaceDialog branch from 4b0b293 to 9c2a156 Compare April 20, 2026 11:35
Comment thread AnkiDroid/src/main/res/values/preferences.xml
@david-allison david-allison removed the Next version Changes to be merged in the next version, to keep the current release stable. label May 7, 2026
@david-allison
Copy link
Copy Markdown
Member

@david-allison david-allison added this pull request to the merge queue May 7, 2026
Merged via the queue into ankidroid:main with commit 67bfbbb May 7, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in AnkiDroid 2.25 May 7, 2026
@github-actions github-actions Bot added this to the 2.25 release milestone May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Maintainers: Please Sync Translations to produce a commit with only the automated changes from this PR.

Read more about updating strings on the wiki,

@github-actions github-actions Bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label May 7, 2026
@lukstbit lukstbit deleted the feat_promoteFindReplaceDialog branch May 8, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Productionize 'Find & Replace'

5 participants