Page MenuHomePhabricator

Implement a find/search and replace tool
Closed, ResolvedPublic

Description

There's a search-and-replace tool in the wikiEditor which some users might miss and would like in VisualEditor somehow.


Version: unspecified
Severity: enhancement

Details

Reference
bz48368

Related Objects

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 1:28 AM
bzimport set Reference to bz48368.

As long as it doesn't have the same performance issues which makes it unusable (bug 23510), I support this. :-)

  • Bug 53326 has been marked as a duplicate of this bug. ***

This still seems to be a popular request from users at multiple Wikipedias.

I'd say that it's a regression and not an enhancement.

Somebody told me that my comment was unclear: when I say that it's a regression and not an enhancement, I mean that the *lack* of search and replace functionality is a regression, and the request to have it should be treated as a bug report and not as an enhancement request.

I agree with Amir. This is regression as this option is already available in WikiEditor and it is very basic functionality (available even in simple notepad), so it isn't an enhancement but at least normal (or major?) bug.

As part of the work on [[meta:Grants:IEG/Visual_editor-_gadgets_compatibility]], I plan to work on [[meta:User:Pathoschild/Scripts/Regex menu framework]], that should give a quick&dirty workaround to this issue.

(In reply to Eran Roz from comment #6)

As part of the work on
[[meta:Grants:IEG/Visual_editor-_gadgets_compatibility]], I plan to work on
[[meta:User:Pathoschild/Scripts/Regex menu framework]], that should give a
quick&dirty workaround to this issue.

Consider using the new version of that script instead:
[[m:User:Pathoschild/Scripts/TemplateScript]]

We have a first working draft for replace tool for VE:
https://en.wikipedia.org/wiki/User:%D7%A2%D7%A8%D7%9F/veReplace.js

It works and replace the specified text, and undo&redo are properly supported (the last is just a claim that we didn't hack the VE too much :) ).
Currently it does only "replace all" but it can be easily extended with simple replace function, regexs and more...
We didn't "publish" it yet in village pumps since we want to do add at least some of this features before.

(In reply to Eran Roz from comment #8)

We have a first working draft for replace tool for VE:
https://en.wikipedia.org/wiki/User:%D7%A2%D7%A8%D7%9F/veReplace.js

This ends up in the (mis-labelled) "Insert" menu, right? Would it be helpful it we created a category of tool to manipulate the contents (a spelling or grammar tool might also fit here, though again it's something you'd generally expect your browser to provide)?

Yes, I would like if it would be possible to create an extra different menu, instead of adding all the tools to mislabelled "Insert". I think the new "Language" option will also fit here.

(In reply to Eran Roz from comment #10)

Yes, I would like if it would be possible to create an extra different menu,
instead of adding all the tools to mislabelled "Insert". I think the new
"Language" option will also fit here.

Hmm. Possibly. I was thinking of putting it in the "text styling" menu, but it could live here.

Is there anything else that would live in the "Tools" menu? (Note that the obvious items to go in a "tools" menu – copy, cut, paste, paste formatting – can't be done in Javascript at all, sadly.)

I can only think of "Language" and "Replace", so I guess we don't have enougth tools right now for a new menu.
(or maybe the "advanced" options (page settings, categories etc...) is actually "tools" menu?)

(In reply to Eran Roz from comment #12)

I can only think of "Language" and "Replace", so I guess we don't have
enougth tools right now for a new menu.
(or maybe the "advanced" options (page settings, categories etc...) is
actually "tools" menu?)

We've been struggling with what to do with categories (which are pretty vital) compared to "don't show TOC" (which is pretty rare). Suggestions for improvements to the toolbar are always welcome. :-)

For now I think the tool can go in the hamburger menu on the right.

For now I think the tool can go in the hamburger menu on the right.

What about in non-MW integrations?

Jdforrester-WMF renamed this task from VisualEditor: Implement a find/search and replace tool to Implement a find/search and replace tool.Nov 24 2014, 3:49 PM