Page MenuHomePhabricator

WWT: Only Show Loading Animation in Revision Details Pop-up If Data Not Yet Loaded
Closed, ResolvedPublic

Description

As a WWT user, I only want the loading animation in the revision details pop-up displayed when data is loading, so I am not inconvenienced with unnecessary wait times or loading states.

Background: The loading animation, as implemented in T231115, is displayed when we ask the MediaWiki API for the revision summary; it has a caveat of being delayed a bit so it does not appear too jumpy even if the connection is super fast. However, if we reopen a popup that was previously opened, we already have the data to display and there's no need to show the animation again.

Acceptance criteria

  • When opening the revision popup, show loading animation (as exists right now) for loading data
  • When reopening a popup that was previously opened (and data is already available) show the data immediately without the loading animation.

Example of Pop-up after Data Loaded:

Screen Shot 2019-10-09 at 9.29.54 PM.png (689×1 px, 441 KB)

Event Timeline

dom_walden subscribed.

After clicking a token, the Edit Summary gets cached. If you click the same token, or another token which was added in the same revision, the Edit Summary appears immediately.

Otherwise, the shimmer happens while the Edit Summary is fetched.

The cached Edit Summary survives using VisualEditor, including after submitting a change.

You can get the Edit Summary of the change you just submitted, which will shimmer first time as normal.

The Edit Summary cache obviously does not survive refreshing the page (e.g. using the Source Editor).

Edit Summary blinking in and out issue in T234483#5615929 no longer appears.

ifried moved this task from Product sign-off to Done on the Community-Tech (Kanban-Q2-2019-20) board.

I have tested this, and it's now working properly. The loading animation appears on first click. It does not appear in subsequent clicks. For this reason, I'm marking this work as Done.