Page MenuHomePhabricator

Limit use of 'hideWhenOutOfView' feature of FloatableElement
Open, Needs TriagePublic

Description

Added in https://gerrit.wikimedia.org/r/#/c/341100/1 (8 months ago).

I think we shouldn't have added this feature for two reasons:
Performance

Usability

  • I don't think elements disappearing because they are partially out of the viewport meets user expectations, and in the case where the viewport is of a restricted size may be frustrating.

Details

Related Gerrit Patches:
mediawiki/extensions/Echo : masterDon't hide notification popup when scrolling

Event Timeline

Esanders created this task.Oct 17 2017, 1:08 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 17 2017, 1:08 PM

The linked commit actually implemented a way to disable this behavior. The behavior was implemented in c449fe11c99f5fdcc2f100b18f7f95787e5fd442 for T129521.

I think the current default behavior is much saner than if we never hid the floatables. Per the linked task, the main purpose is to make DropdownWidget's floatable MenuSelectWidget disappear when the DropdownWidget is scrolled offscreen (instead of a "detached" MenuSelectWidget remaining visible), which seems like a very reasonable thing to do.

For comparison, if you try to scroll while a <select> dropdown is open, browsers will either immediately close the dropdown or prevent you from scrolling.

See T129521 examples of the results that never hiding dropdowns produces. This specifically:

Esanders added a comment.EditedOct 24 2017, 11:57 AM

So there is some argument to use it iff the following two condition are met:

  1. The container is a DOM element, and not the viewport - otherwise you are just wasting time doing clipping the browser is already doing.
  2. The floatable is *completely* outside the container.

Currently this is causing the Echo notification popup to disappear as soon as I scroll down 1 pixel.

Esanders renamed this task from Remove 'hideWhenOutOfView' feature of FloatableElement to Limit use of 'hideWhenOutOfView' feature of FloatableElement.Jan 22 2018, 11:32 PM

Change 405816 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/Echo@master] Don't hide notification popup when scrolling

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

Currently this is causing the Echo notification popup to disappear as soon as I scroll down 1 pixel.

This is fixed by the patch above.

Change 405816 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] Don't hide notification popup when scrolling

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

Volker_E removed a subscriber: gerritbot.