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

matmarex subscribed.

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 moved this task from Backlog to Doing on the good first task board.
Kizule subscribed.

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 :)

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 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

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