Last modified: 2013-06-18 15:27:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 20919 - Search & Replace: Change "Replace Next" functionality to "Replace" functionality
Search & Replace: Change "Replace Next" functionality to "Replace" functionality
Product: MediaWiki extensions
Classification: Unclassified
UsabilityInitiative (Other open bugs)
PC Windows Vista
: Normal normal (vote)
: ---
Assigned To: Amir E. Aharoni
: patch, patch-need-review
: 24327 32062 (view as bug list)
Depends on:
Blocks: 36111
  Show dependency treegraph
Reported: 2009-10-01 07:43 UTC by Calcey QA
Modified: 2013-06-18 15:27 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

Microsoft Word application functionality (19.93 KB, image/jpeg)
2009-10-01 07:43 UTC, Calcey QA
Patch to fix the problem. Should be tested. (6.35 KB, patch)
2011-09-13 08:45 UTC, Amir E. Aharoni

Description Calcey QA 2009-10-01 07:43:45 UTC
Created attachment 6609 [details]
Microsoft Word application functionality

Reporting against build r57044 in staging environment

Steps to reproduce ::
1) Start creating a new page
2) Enter several statements in the text area.


3) Click on 'Search and replace' icon.
4) Set search for with 'Calcey' and replace with ='MediaWiki'.
5) Now click on 'Find Next' button.
<<First 'Calcey' text has highlighted>>
6) Now click on 'Replace Next' button.
<<Second 'Calcey' text has changed to 'MediaWiki'>>

Expected Outcome ::
User should able to replace the first 'Calcey' value with the 'MediaWiki' word.

Suggestion ::
Change the 'Replace Next' button caption and functionality into 'Replace'.
Then the user can replace the text from the first expected found values.

I have attached the current functionality of the Microsoft word application.
Comment 1 Roan Kattouw 2009-10-11 13:40:07 UTC
bug 20893 comment 3 makes some points in favor of this request.
Comment 2 tagishsimon 2010-06-14 20:12:06 UTC
Agreed. With the current UI, there is no way to find, and the replace that which has been found. By contrast one can find, and then replace_next, which replaces some random item you've not yet seen, somewhere lower down the page. Bizarre.
Comment 3 Amir E. Aharoni 2011-03-09 22:29:13 UTC
*** Bug 24327 has been marked as a duplicate of this bug. ***
Comment 4 Amir E. Aharoni 2011-03-09 22:30:36 UTC
Bug 24327 is essentially a dupe of this one, but its description summarizes the problem very well:

In the search & replace dialog a "Replace and find next" button would be much
more helpful than the "Replace next".
Comment 5 Rodan BURY 2011-04-04 18:05:08 UTC
I support this request. This has been a interaction design issue for a very long time. It is very strange that the usability team made such a blatant mistake, as the rest of the features they produced doesn't contain such blatant mistakes.

I would very much like to see this one fixed.
Comment 6 Bugmeister Bot 2011-08-19 19:12:46 UTC
Unassigning default assignments.
Comment 7 Amir E. Aharoni 2011-09-13 08:45:11 UTC
Created attachment 9055 [details]
Patch to fix the problem. Should be tested.

"Replace next" now replaces the currently selected text instead of finding the next occurrence and replacing it.

To keep the location of the current occurrence, i added matchIndex to $(this).data.

I added some comments renamed a couple of variable for readability:
* s to textRemainder
* replace to actualReplacement

This is my first significant jQuery-style patch so it may have embarrassing mistakes - constructive criticism is welcome.
Comment 8 Siebrand Mazeland 2011-09-13 09:00:58 UTC
Committed in r96944.
Comment 9 Roan Kattouw 2011-10-31 08:38:42 UTC
*** Bug 32062 has been marked as a duplicate of this bug. ***
Comment 10 Roan Kattouw 2011-10-31 08:40:15 UTC
(In reply to comment #8)
> Committed in r96944.
Followed up in r101339: renamed "Replace next" button to "Replace".

Note You need to log in before you can comment on or make changes to this bug.