Page MenuHomePhabricator

Wire Close Popper Action to 'cross' and blur action
Closed, ResolvedPublic

Description

Note: consider if the cross should be handled by an EventEmittingButton (from termbox) like thing.

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : masterTR: Close the popper on focusout
mediawiki/extensions/Wikibase : masterTR: Close popper on TaintedIcon blur
mediawiki/extensions/Wikibase : masterTR: Close popper when x is clicked

Event Timeline

Tarrow created this task.Oct 30 2019, 10:59 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 30 2019, 10:59 AM
hoo claimed this task.Nov 6 2019, 11:08 AM
hoo moved this task from To Do to Doing on the Wikidata-Tainted-References-Sprint4 board.

Change 549085 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] TR: Close popper when x is clicked

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

I have a patch that wires up the "x" to close the popper, I didn't yet look into closing it if the user clicks onto something else.

Change 549085 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] TR: Close popper when x is clicked

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

hoo added a comment.Nov 7 2019, 10:38 AM

So apparently OOUI sets tabindex="0" on the constraints icon, with that we can actually focus (and thus also handle blur). I'll do the same for us in order to re-implement the behavior as closely as possible.

@hoo cool. That sounds great and I remember us having to do the same thing with the modal type objects we built for termbox.

Change 549675 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] TR: Close popper on TaintedIcon blur

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

hoo added a comment.Nov 8 2019, 12:21 AM

I just implemented it like this, but I'm not sure that's going to suffice… if the user clicks on the popper, this will probably also trigger the blur and thus close the popper. Maybe if the popper is a direct child of the TaintedIcon <a> this will work, but I'm not sure.

Change 551541 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] TR: Close the popper on focusout

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

Change 549675 abandoned by Hoo man:
TR: Close popper on TaintedIcon blur

Reason:
Replaced by I5dad7680a7e0a48be1e518d73c28812b7b819fb4.

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

Change 551541 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] TR: Close the popper on focusout

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