After clicking the "Extract Text" button the warning popup should only be shown if the text area is not empty or if the original text that was loaded on page load has been changed
Description
Details
Related Objects
Event Timeline
As per last week's meeting, this task includes the restyling of the "replace text" popup. However, do we want to consider/discuss T285415#7181689 first? If we go for that, there'd be no popup to improve. Maybe we can do just the "warn only if base text was changed" part here (which should be easy and independent from the warning layout), and create another task (or continue at T285415) for the design part?
I think adding the "warn only if changed" here is a good step, regardless of the eventual design. It's not a huge thing to add, and will I think remove a good number of annoying popups.
Change 702478 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):
[mediawiki/extensions/Wikisource@master] Show text replacement warning only if the original text has been edited
Change 702478 merged by jenkins-bot:
[mediawiki/extensions/Wikisource@master] Show text replacement warning only if the original text has been edited
After clicking the "Extract Text" button the warning popup should only be shown if the text area is not empty or if the original text that was loaded on page load has been changed
Technically, you will only see the warning popup if the text area is non-empty and has been changed since the page loaded.
You won't see the warning popup if either:
- The text area is empty. For example, https://en.wikisource.beta.wmflabs.org/w/index.php?title=Page:Wind_in_the_Willows_(1913).djvu/16&action=edit.
- The text has not been changed since the page loaded. For example, https://en.wikisource.beta.wmflabs.org/w/index.php?title=Page:Wind_in_the_Willows_(1913).djvu/15&action=edit.
Test environment: https://en.wikisource.beta.wmflabs.org Wikisource β (847a252) 08:08, 14 July 2021.
Test browsers: Firefox 78, Safari 13.
Thanks for fixing this @Daimona! This was definitely the intended behavior when we thought about the warning being preventative of saving lost work someone already touched. In terms of scope protection for next steps, this is making realize https://phabricator.wikimedia.org/T286564 may not really be super urgent anymore. Let's discuss in our next 1:1 @nayoub
