Page MenuHomePhabricator

Show warning popup for text replacement only if the original text has been edited
Closed, ResolvedPublic1 Estimated Story Points

Description

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

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptJun 24 2021, 11:48 PM
ldelench_wmf set the point value for this task to 3.Jun 24 2021, 11:54 PM

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.

Daimona changed the point value for this task from 3 to 2.

Nice, doing now and re-setting story points to reflect the resize.

Daimona changed the point value for this task from 2 to 1.Jun 30 2021, 10:44 PM

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

https://gerrit.wikimedia.org/r/702478

Change 702478 merged by jenkins-bot:

[mediawiki/extensions/Wikisource@master] Show text replacement warning only if the original text has been edited

https://gerrit.wikimedia.org/r/702478

dom_walden subscribed.

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:

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