Page MenuHomePhabricator

Watchlist Expiry: Temporarily watched page shows full star after publishing in VisualEditor until reload
Closed, ResolvedPublic5 Estimated Story PointsBUG REPORT

Description

As a Watchlist Expiry user, I want the star to remain half shaded if I choose to continue watching a page in VE, so that I do not receive confusing or misleading information about the watch status when viewing the star.

Background

Editing a temporarily watched page via VE, if you check "Watch this page" when publishing, the watch star is full. If you refresh, it shows half-filled again.

Acceptance Criteria

  • If the user is watching a page temporarily, and if they select to watch the page when editing in VE, the star should automatically display the half shade (rather than full shade until refresh)
Steps to reproduce problem
  1. Go to any page
  2. Watch temporarily
  3. Edit via the VisualEditor
  4. When clicking "Publish changes...", check "Watch this page" and publish

Expected behavior: Returns you to the article, the watch star is half-filled (unless we want the page to be permanently watched, but I suspect we don't)
Observed behavior: Returns you to the article, the watch star is full

Environment

Wiki(s): https://en.wikipedia.beta.wmflabs.org MediaWiki 1.36.0-alpha (d560bee) 2020-08-14T09:17:05

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptAug 14 2020, 1:34 PM
ARamirez_WMF set the point value for this task to 5.Aug 20 2020, 11:14 PM

Change 622204 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/extensions/VisualEditor@master] Start using edit api results for watchlist UI updates

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

Change 622441 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/core@master] [Watchlist] Fix updateWatchLink removing css class when action=watch

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

FYI we have very similar logic in the DiscussionTools extension (which uses the VE API) which will need to be updated too.

I noticed that we recently broke our watchlist star behaviour in DiscussionTools though, so you will need to work on top of https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/622684/.

Change 622204 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Start using edit api results for watchlist UI updates

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

FYI we have very similar logic in the DiscussionTools extension (which uses the VE API) which will need to be updated too.

I noticed that we recently broke our watchlist star behaviour in DiscussionTools though, so you will need to work on top of https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/622684/.

You mean to add support for watchlistexpiry just like in https://gerrit.wikimedia.org/r/622204? Sorry I'm not familiar with DiscussionTools

Yes - we just need to update the frontend code to update the watchlist star based on the API result (it uses the same backend code).

Change 623004 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] Update watchlist status from API result

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

Change 623004 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Update watchlist status from API result

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

Change 622441 merged by jenkins-bot:
[mediawiki/core@master] Watchlist: Fix updateWatchLink removing css class when action=watch

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

@dmaza @ifried Do we also want to do this for the tooltip? At the moment, after submitting, the watch star is half-filled but the tooltip is for permanent (i.e. "Remove this page from your watchlist.", doesn't say number of days left).

I believe the tooltip issue will be fixed with T261030. Is that correct, @dmaza?

In terms of priority, we should fix the tooltip issue, but it can come after the MVP/first release on September 14th. It also doesn't need to block this work, and we have discussed that this ticket can be marked as Done without the tooltip fix. While the former star behavior gave incorrect information to users, the current tooltip behavior merely gives *less* information to users.

I believe the tooltip issue will be fixed with T261030. Is that correct, @dmaza?

I believe this is true. I missed this comment in the code commit: ...T261030 needs to be fixed or temporarily watched items will not display the right tooltip...

In terms of priority, we should fix the tooltip issue, but it can come after the MVP/first release on September 14th. It also doesn't need to block this work, and we have discussed that this ticket can be marked as Done without the tooltip fix. While the former star behavior gave incorrect information to users, the current tooltip behavior merely gives *less* information to users.

OK, thanks.

I haven't been able to reproduce the bug in the description.

I've tested VisualEditor with and without watchlist expiry enabled. I didn't see any problems in the UI or in the logs.

I also briefly tested DiscussionTools. After submitting a reply to a temporarily watched page, the watch star is half shaded (but tooltip is incorrect).

Test environments:

I believe the tooltip issue will be fixed with T261030. Is that correct, @dmaza?

Yes, sorry I missed your question.

Change 626527 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/extensions/VisualEditor@REL1_35] Start using edit api results for watchlist UI updates

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

Change 626530 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/core@REL1_35] Watchlist: Fix updateWatchLink removing css class when action=watch

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

Change 626527 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@REL1_35] Start using edit api results for watchlist UI updates

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

Change 626530 merged by jenkins-bot:
[mediawiki/core@REL1_35] Watchlist: Fix updateWatchLink removing css class when action=watch

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

I have tested this, and the half-shaded star remains in place when I now edit in VE & select "Watch this page." I have attached a screenshot of what I see when I perform this behavior (see below). For this reason, I'm marking this ticket as Done.

Screen Shot 2020-09-11 at 10.01.30 AM.png (491ร—999 px, 119 KB)