Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#46684 closed defect (bug) (fixed)

Site Health: the ellipsis CSS keyframe animation doesn't work in all browsers

Reported by: afercia's profile afercia Owned by: pento's profile pento
Milestone: 5.2 Priority: normal
Severity: normal Version: 5.2
Component: Site Health Keywords: site-health has-patch commit
Focuses: coding-standards Cc:

Description

Splitting this out from https://core.trac.wordpress.org/ticket/46573#comment:59

The "ellipsis" CSS keyframe animation (used on the health score indicator while the score is being calculated) works only in webkit and Firefox: doesn't work in Edge and IE11.

Turns out content isn't one of the CSS animatable properties. The fact it works in webkit and Firefox is non-standard and not guaranteed to work in the future.

There are alternative CSS techniques (a few examples here), but they somehow rely on the font metrics and on animating the width of the "dots" container. I've tried one of them but WordPress uses system fonts so the rendering is different on different operating systems. The width varies and those techniques seem unreliable.

Though minor, I don't see a good reason why WordPress should release new code with features that don't work in all the officially supported browsers.

I'd suggest to use a different animation. It doesn't necessarily needs to display "dots".

Attachments (2)

46684.patch (700 bytes) - added by Clorith 6 years ago.
loading-middot.png (53.2 KB) - added by Clorith 6 years ago.

Download all attachments as: .zip

Change History (11)

#1 @afercia
6 years ago

  • Keywords site-health added

#2 @Clorith
6 years ago

The dots here were added as an extra visual element, as the ring also "pulses" while it's loading, but I wanted to provide something more for those who may not pick up on colors as easily.

There's nothing wrong with providing a static "..%" sort of display while it's loading if there's problems with some of the animations.

#3 @afercia
6 years ago

It's a non-standard behavior. This animation could stop working at any time also in webkit and Firefox.

#4 @Clorith
6 years ago

Ahh, sorry I may have been a bit unclear.

Would using a fixed string of ..% while it's running be OK, no animations or anything just the text, and then replace it once tests are completed?

@Clorith
6 years ago

#5 @Clorith
6 years ago

  • Keywords has-patch added; needs-patch removed

46684.patch removes the animations on the loading ellipsis, and uses the middle dot character to indicate an unloaded state.

This leaves a centered (see #46781) indicator, with no animations, to at least make it clear there's something missing from that area at this time.

#6 @Clorith
6 years ago

  • Keywords commit added

#7 @pento
6 years ago

  • Owner set to pento
  • Status changed from new to accepted

#8 @pento
6 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 45145:

Site Health: Remove animated ellipsis from the status loading indicator.

This animation wasn't particularly reliable across browsers.

Props Clorith, afercia.
Fixes #46684.

#9 @spacedmonkey
6 years ago

  • Component changed from Administration to Site Health
Note: See TracTickets for help on using tickets.