Page MenuHomePhabricator

Support $overlay on DropdownInputWidget
Closed, ResolvedPublic

Description

Hey, this is my first task here so apologies if I created it wrong! Is it possible to add $overlay to DropdownInputWidget? I see that it is already part of DropdownWidget (T108949), but there are use cases for using the input widget instead, e.g using a form inside of a modal, that would require it to be able to expand outside of the modal. I imagine that this wouldn't be hard to do, considering that ComboBoxInputWidget has this option already and is similar in functionality. Thanks!

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 26 2018, 1:26 PM
JaydenKieran updated the task description. (Show Details)Jan 26 2018, 1:34 PM
matmarex added a subscriber: matmarex.

You can actually pass this option like this:

new DropdownInputWidget( {
  dropdown: { $overlay: ... }
} );

(The entire 'dropdown' object is passed as configuration for the internal OO.ui.DropdownWidget)

But actually I agree, you should also be able to pass it directly. In DropdownInputWidget we should do something like this to pass it on:

this.dropdownWidget = new OO.ui.DropdownWidget( $.extend( { $overlay: config.$overlay }, config.dropdown ) );

Do you want to submit a patch? :)

Kizule claimed this task.Mar 27 2018, 9:57 PM
Kizule moved this task from Backlog to Doing on the good first task board.
Kizule added a subscriber: Kizule.

You can actually pass this option like this:

new DropdownInputWidget( {
  dropdown: { $overlay: ... }
} );

(The entire 'dropdown' object is passed as configuration for the internal OO.ui.DropdownWidget)

But actually I agree, you should also be able to pass it directly. In DropdownInputWidget we should do something like this to pass it on:

this.dropdownWidget = new OO.ui.DropdownWidget( $.extend( { $overlay: config.$overlay }, config.dropdown ) );

Do you want to submit a patch? :)

User was not responded more than one month. I will submit a patch :)

Restricted Application added a project: User-Kizule. · View Herald TranscriptMar 27 2018, 9:57 PM
Kizule removed Kizule as the assignee of this task.Jul 22 2018, 3:49 PM
Kizule removed a project: User-Kizule.
Kizule moved this task from Doing to Backlog on the good first task board.

Removing assignee because I no have much free time to work on this because own problems in real life.

Change 447810 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[oojs/ui@master] Add support for $overlay on DropdownInputWidget

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

xSavitar claimed this task.Jul 25 2018, 2:21 PM
xSavitar triaged this task as Medium priority.

Change 447810 merged by jenkins-bot:
[oojs/ui@master] Add support for $overlay on DropdownInputWidget

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

matmarex closed this task as Resolved.Aug 7 2018, 8:46 PM
matmarex removed a project: Patch-For-Review.

Change 452872 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[mediawiki/core@master] Update OOUI to v0.28.0

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

Change 452872 merged by jenkins-bot:
[mediawiki/core@master] Update OOUI to v0.28.0

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

Jdforrester-WMF added a subscriber: Jdforrester-WMF.

The OOUI release landed in MediaWiki 1.32.0-wmf.18.