Opened 13 years ago
Last modified 13 years ago
#9750 new enhancement
Preview button
Reported by: | Ryan J Ollos | Owned by: | Gasler Radu |
---|---|---|---|
Priority: | normal | Component: | WikiReplacePlugin |
Severity: | normal | Keywords: | preview changes |
Cc: | Steffen Hoffmann | Trac Release: | 0.11 |
Description
There should be a preview button that shows which pages will have replacements made.
Attachments (2)
Change History (13)
comment:1 follow-up: 3 Changed 13 years ago by
comment:2 follow-up: 4 Changed 13 years ago by
Cc: | Steffen Hoffmann added; anonymous removed |
---|
This plugin seems incredibly useful and I haven't found anything else like it on Trac-Hacks. I think the preview button is important, since a plugin like this has the potential to do a lot of damage. However, I'm expecting the plugin is pretty stable since this is now the only open ticket.
I have some questions about how the replacements are done, which I will try to sort out and document on the project's wiki page. For example, if I input a into the Find field and b into the Replace field, every occurrence of the character a will be replaced with b, which was a bit unexpected. I was expecting that a and b would be treated as words, unless a regular expression or glob was provided.
comment:3 Changed 13 years ago by
comment:4 follow-ups: 5 9 Changed 13 years ago by
Replying to rjollos:
This plugin seems incredibly useful and I haven't found anything else like it on Trac-Hacks. I think the preview button is important, since a plugin like this has the potential to do a lot of damage. However, I'm expecting the plugin is pretty stable since this is now the only open ticket.
I have some questions about how the replacements are done, which I will try to sort out and document on the project's wiki page. For example, if I input a into the Find field and b into the Replace field, every occurrence of the character a will be replaced with b, which was a bit unexpected. I was expecting that a and b would be treated as words, unless a regular expression or glob was provided.
Yes, you're right, the replace form is not very intuitive right now. We could provide a set of options for the replace mode like: regular expression/glob, match whole words, case sensitive.
comment:5 follow-up: 7 Changed 13 years ago by
Replying to miezuit:
Yes, you're right, the replace form is not very intuitive right now. We could provide a set of options for the replace mode like: regular expression/glob, match whole words, case sensitive.
I will plan to do some work on that eventually. I think I can add a patch for preview mode in the near future. Is it okay if I push changes straight to the repository and ask for your code review? I'll follow up quickly with any changes that need to be made.
Changed 13 years ago by
Attachment: | Feedback1.png added |
---|
Changed 13 years ago by
Attachment: | Feedback2.png added |
---|
comment:6 follow-up: 8 Changed 13 years ago by
One of the things I've been considering is how the list of wiki pages will be displayed. A quick and easy way to do this would be to use add_notice
or add_warning
from trac.web.chrome
. However, I don't think this will work well for a long list of pages, so we may want come up with a nice way to display the list as a permanent solution.
add_warning example:
add_notice example:
comment:7 Changed 13 years ago by
Replying to rjollos:
Replying to miezuit:
Yes, you're right, the replace form is not very intuitive right now. We could provide a set of options for the replace mode like: regular expression/glob, match whole words, case sensitive.
I will plan to do some work on that eventually. I think I can add a patch for preview mode in the near future. Is it okay if I push changes straight to the repository and ask for your code review? I'll follow up quickly with any changes that need to be made.
Yes, of course. It's no problem. Just go for it.
comment:8 follow-up: 10 Changed 13 years ago by
comment:9 follow-up: 11 Changed 13 years ago by
Replying to miezuit:
Replying to rjollos:
Yes, you're right, the replace form is not very intuitive right now. We could provide a set of options for the replace mode like: regular expression/glob, match whole words, case sensitive.
I think we should also create a follow up ticket for the customizable replace mode. Is it ok with you?
comment:10 Changed 13 years ago by
Keywords: | preview changes added |
---|
Replying to miezuit:
Replying to rjollos:
I was also thinking about something more fancy (but don't know yet if it's possible) like displaying all replacements that were done in the wiki pages as a changeset with diffs. ...
Yes, a basic list would be fine with number of changes in brackets behind each page name. This could be the label for a link to show changes per file, like the list we see today above the diffs. Add a checkbox, to show changes inline below too, because in some situations there might be simply too much to display for a single page to make this the default display mode.
comment:11 Changed 13 years ago by
Replying to miezuit:
I think we should also create a follow up ticket for the customizable replace mode. Is it ok with you?
Yeah, that sounds good.
I'm ready to provide a patch for this, or can push the change directly to the repository if it's okay with the plugin author.