Page MenuHomePhabricator

Watchlist Expiry: Edit page expiry dropdown should keep the remaining days preselected after disabling/enabling
Open, Needs TriagePublic

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

dmaza created this task.Tue, Jul 28, 6:15 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptTue, Jul 28, 6:15 PM
dmaza updated the task description. (Show Details)Tue, Jul 28, 6:16 PM
ifried assigned this task to dmaza.Tue, Jul 28, 6:22 PM
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)
ifried added a subscriber: ifried.Tue, Jul 28, 7:14 PM

moving this to kanban since dayllan is working on it

Restricted Application edited projects, added Community-Tech; removed Community-Tech (Kanban-2020-21-Q1). · View Herald TranscriptTue, Jul 28, 7:14 PM

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

ifried updated the task description. (Show Details)Thu, Jul 30, 4:40 PM

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 (e73e964) 16:38, 7 August 2020