Page MenuHomePhabricator

Watchlist Expiry: Edit page expiry dropdown should keep the remaining days preselected after disabling/enabling
Closed, ResolvedPublic

Description

Background: When editing a page (if it is temporarily watched), the dropdown is preselected with the remaining days until expiry. If you uncheck the "watch this page" and re-check again, the previous selection is lost.

Acceptance Criteria:

  • If the user temporarily watches the page and then clicks to unwatch (without saving changes), the temporary watch dropdown should display (in disabled format) the previous selection (such as "XX days left") rather than switching to "Permanent."
  • If the user clicks to watch before saving, the drop-down should be enabled and display the previous selection as default.

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptJul 28 2020, 6:15 PM
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)

moving this to kanban since dayllan is working on it

Change 616903 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/core@master] Edit page expiry dropdown should keep state after disabling/enabling

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

Change 616903 merged by jenkins-bot:
[mediawiki/core@master] Edit page expiry dropdown should keep state after disabling/enabling

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

Change 617810 had a related patch set uploaded (by Samwilson; owner: Dmaza):
[mediawiki/core@REL1_35] Edit page expiry dropdown should keep state after disabling/enabling

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

Change 617810 merged by jenkins-bot:
[mediawiki/core@REL1_35] Edit page expiry dropdown should keep state after disabling/enabling

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

  • If the user temporarily watches the page and then clicks to unwatch (without saving changes), the temporary watch dropdown should display (in disabled format) the previous selection (such as "XX days left") rather than switching to "Permanent."

I am assuming "If the user temporarily watches..." means either:

  • I am editing a page that I am already temporarily watching
  • While editing a page, I use the watch star to temporarily watch it

And "...clicks to unwatch..." means either:

  • Unwatching via the watch star
  • Unchecking the "Watch this page" checkbox

In all these cases, the behaviour is as described.

  • If the user clicks to watch before saving, the drop-down should be enabled and display the previous selection as default.

This is true if the user checks the "Watch this page" checkbox.

If the user watches the page with the watch star, the dropdown switches to "Permanent". This keeps it consistent with the value of the expiry dropdown in the watch star popup. It would probably be confusing to have the two dropdowns say different things.

As before, if you use the expiry dropdown in the watch star popup to change the expiry, the edit page expiry dropdown changes to match.

This change means that the value of the edit page expiry dropdown is never changed automatically, unless the user watches the page with the watch star or changes the expiry in the watch star popup.

In case of regression, I turned off Watchlist Expiry (in my local vagrant). While editing watched and unwatched page I saw no errors in the browser console or logs.

Test environment: https://test.wikipedia.org MediaWiki 1.36.0-wmf.3 (rMWe73e964e0655) 16:38, 7 August 2020

I have tested this on testwiki, and it looks good. If a temporary watch has been selected, and if the user is in edit view & either unwatches via the checkbox or the star, the previous selection is still accessible via the dropdown, if the user checks the box to watch the page again. If the user chooses to watch permanently via star, the dropdown will have "permanent" as the selection. Meanwhile, if the user watches temporarily via star, the dropdown will be updated to reflect the temporary watch period. I'm marking this as Done.