Page MenuHomePhabricator

[M] Add a "pending" state to QualifierWidget read-mode
Closed, ResolvedPublic


When the user submits new Qualifier data, the API request to provide a human-readable label can sometimes take a while to complete. This is probably more of an issue on development instances than on production but users with a poor connection are likely still impacted.

A simple "pending" state would improve the experience here. I'd like to avoid adding additional complexity, but even a simple "..." so that the user knows that *something* has happened as a result of their action.

@PDrouin-WMF I defer to your judgment here, but I will try to get a patch of the simplest possible solution ready as a starting point.

Acceptance Criteria:

  1. Put the qualifier element into the OOUI pending state while waiting for the qualifier submission to complete

COVID-19 Deployment Criteria

  • Can you roll back this change without lasting impact?
    1. A recovery plan is required as this will help identify our capacity for recovering from the failure
    2. THIS IS A KEY QUESTION, if you can’t answer it, you shouldn’t deploy
  • Is specialized knowledge required to support this change in production? If so, are there multiple people with this knowledge?

No specialized knowledge needed

  • Is there a way to increase confidence about the correctness of this change?

Code review + manual testing

  1. Reviews (Design, Code, etc)
  2. Testing coverage (unit tests, integration tests)
  3. Manual testing (e.g. Beta, vagrant, docker)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Setting this to "low priority" because it seems like this is much more of an issue when developing locally in Docker (which is really slow). On BetaCommons, even when using browser devtools to throttle network speeds down to 2G levels, things seem to work pretty well.

Hey @egardner - whatever is simplest sounds good to me.

CBogen renamed this task from Add a "pending" state to QualifierWidget read-mode to [M] Add a "pending" state to QualifierWidget read-mode.Mar 18 2020, 4:53 PM
CBogen updated the task description. (Show Details)

Change 581100 had a related patch set uploaded (by Eric Gardner; owner: Eric Gardner):
[mediawiki/extensions/WikibaseMediaInfo@master] Add OO.ui.mixin.PendingElement to QualifierWidget

Change 581100 abandoned by Eric Gardner:
Add OO.ui.mixin.PendingElement to QualifierWidget

Abandoned in favor of /582921

Ramsey-WMF added a subscriber: Ramsey-WMF.

ready to test on beta Commons 👍🏼

Etonkovidova closed this task as Resolved.EditedApr 21 2020, 8:57 PM

Checked in betalabs and wmf.28with 2G throttling.

Additionally adds a new CSS rule to hide elements in the qualifier area
(.wbmi-content-items and .wbmi-statement-footer) while the panel is in pending
state, so that users don't see the intermediate states of any QualifierWidgets
as data is being published.

Screen Shot 2020-04-21 at 1.53.40 PM.png (385×918 px, 98 KB)

(the sreenshot below is an animate gif - click to view)

pending_state3.gif (520×1 px, 319 KB)

  • no noticeable delay (pending) state when switching between Edit and view modes
  • when suggestions are being fetched
    Screen Shot 2020-04-21 at 8.57.24 AM.png (199×1 px, 39 KB)

Screen Shot 2020-04-21 at 8.57.46 AM.png (433×861 px, 53 KB)