Page MenuHomePhabricator

RC filters: filter selector drop down is misplaced in RTL
Closed, ResolvedPublic

Description

Filed as a separate issue - split from T149435: Build user interface for the Filter Search Bar

Screen Shot 2017-02-04 at 6.59.26 AM.png (697×1 px, 129 KB)

Event Timeline

Change 337210 had a related patch set uploaded (by Mooeypoo):
RCFilters UI: Fix popup position for RTL

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

Mooeypoo added subscribers: matmarex, Catrope, Mooeypoo.

This is a bit of a hack until we figure out the positioning overrides that happen in PopupWidget vs FloatableElement and manage to add RTL fixes to those positioning calculations.

@Catrope and @matmarex may find this interesting...

I tried not to drown too much in the different calculations, but I think that now that PopupWidget has become FloatableElement, the 'PopupWidget#updateDimensions' method should seriously change to adjust. At the very least, we have to correct FloatableElement stuff to RTL, since if the menu isn't full-width with the input it floats under (like our case) then RTL adjustment is a must.

I think that PopupWidget (and maybe also FloatableElement) need to have their positioning logic rewritten completely. Right now it's always left-based, even in RTL, but that means that some features like anchoring an iconed ButtonPopupWidget's popup to its icon fundamentally cannot work in RTL. Instead, I'm going to try to make it right-based in RTL. I'll take a stab at this today.

I think that PopupWidget (and maybe also FloatableElement) need to have their positioning logic rewritten completely. Right now it's always left-based, even in RTL, but that means that some features like anchoring an iconed ButtonPopupWidget's popup to its icon fundamentally cannot work in RTL. Instead, I'm going to try to make it right-based in RTL. I'll take a stab at this today.

I did this as part of T157867: PopupButtonWidget alignment is broken in RTL.

With the most recent OOUI release, this is now fixed in master.

Change 337210 merged by jenkins-bot:
RCFilters UI: Add 'direction' property to the wrapper

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

Checked in betalabs - the drop-down panel is displayed in correct place.

Screen Shot 2017-02-24 at 3.15.43 PM.png (624×1 px, 111 KB)

QA recommendation: Resolve.