Page MenuHomePhabricator

Scrolling on the Echo survey's popup/tooltip
Open, Needs TriagePublic

Description

The tooltip is now on-click as requested at T131893 , but there is some vertical scrolling. It still technically works, but it's weird so we probably want to get rid of it.

On https://gerrit.wikimedia.org/r/#/c/282715/ (branched off 1.27.0-wmf.20 with image height and on-click/white-space fix):

Firefox 44 - Vertical scroll every time. For English, the scrollbar is useless, since you can see literally all the text regardless of scroll. For French, the box would have to expand to avoid it (one line is entirely hidden). Note it's the wrong translation on this branch (but right in production due to LocalisationUpdate). But with the right translation it still doesn't fit without scrolling.

Chromium - No scroll English. Useless scroll in French with correct or incorrect translations.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 11 2016, 7:24 PM

This example is in English, but the same happens when I render this in French.

The Alerts (long list of notifications, which goes to the bottom and requires scrolling) has a scrolling info tooltip.

The Messages (short list of notifications) has an info tooltip which doesn't scroll.

I also hit a weird sub-bug:

The .mw-echo-ui-mixin-hover-opacity() (which should only affect the icon's opacity on hover/non-hover) affects how the attached popup clips.

Assuming that's resolved (we could just drop the on-hover opacity change if that's acceptable), possible solutions:

  1. Make the footer area bigger (probably requires making notification area smaller since the overall Echo popup takes basically the whole vertical area).
  2. Allow this tooltip (a popup) to protrude beyond the main Echo popup. That might provide just the few extra pixels necessary to stop it from scrolling (at least in some cases); I've been looking at this.

Fundamentally, though, I don't know how to solve this if the text is long enough. There's really only a little bit of extra space below, and AFAICT OOjs UI popups can't go above their anchors.

I'm going to put this down for now, and check in with Roan when he gets back.

In T132384#2208687, @Mattflaschen wrote:

I also hit a weird sub-bug:
The .mw-echo-ui-mixin-hover-opacity() (which should only affect the icon's opacity on hover/non-hover) affects how the attached popup clips.

Hmm, if that's setting the opacity on the popup as well as the icon, I can see how that would cause bugginess in Chrome at least. Setting opacity causes things to render differently, and there are lots of browser bugs that are triggered (or fixed) by setting opacity: 0.999;.

In T132384#2208705, @Mattflaschen wrote:

Assuming that's resolved (we could just drop the on-hover opacity change if that's acceptable), possible solutions:

  1. Make the footer area bigger (probably requires making notification area smaller since the overall Echo popup takes basically the whole vertical area).

The notification area takes as much space as it can, so making the footer area bigger should work.

  1. Allow this tooltip (a popup) to protrude beyond the main Echo popup. That might provide just the few extra pixels necessary to stop it from scrolling (at least in some cases); I've been looking at this.

Normally we could do this by setting $overlay (and I think that may have been done already?), but in this case that wouldn't help that much because there isn't much of a difference between the bottom edge of the popup and the bottom edge of the screen.

Fundamentally, though, I don't know how to solve this if the text is long enough. There's really only a little bit of extra space below, and AFAICT OOjs UI popups can't go above their anchors.

Yeah, PopupWidget does not deal well with this case unfortunately.

I'm guessing that if we fix this here, it will be fixed when we repurpose this panel for other uses (e.g., encouraging beta opt-in). Assuming that's true, then this is worth fixing, since we do plan to re-use this.

I'm guessing that if we fix this here, it will be fixed when we repurpose this panel for other uses (e.g., encouraging beta opt-in).

Yes, that's right.

Jdforrester-WMF removed Catrope as the assignee of this task.Mar 28 2017, 4:24 PM