Break out search stuff in TextInputWidget into SearchInputWidget
Open, NormalPublic

Description

From @matmarex's comment on https://gerrit.wikimedia.org/r/#/c/283652/

  • No changes to TextInputWidget (except maybe a deprecation warning?), introduce SearchInputWidget that just does calls parent constructor with { type: 'search' } – this would be just a deprecation, code depending on OOjs UI could be updated to use new SearchInputWidget
  • Revert changes from step 1 and do this change – this would be a breaking change, but hopefully all code was already updated by this point

Change 283652 had a related patch set uploaded (by Prtksxna):
Break out parts of TextInputWidget into a new SearchInputWidget

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

Prtksxna edited the task description. (Show Details)Oct 20 2016, 9:54 PM

@Jdforrester-WMF When should we schedule the second part of this?

Change 283652 merged by jenkins-bot:
Break out parts of TextInputWidget into a new SearchInputWidget

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

@Jdforrester-WMF When should we schedule the second part of this?

Deprecation will go out in the next release (0.18.0), flagged in the notes; following our practice, that means we should find and fix all users in Wikimedia git, and wait a couple of weeks.

He7d3r added a subscriber: He7d3r.Nov 21 2016, 10:34 AM
Volker_E moved this task from Backlog to Next-up on the OOjs-UI board.Jan 4 2017, 2:12 AM

Change 333584 had a related patch set uploaded (by Prtksxna):
[BREAKING CHANGE] TextInputWidget: Remove search related methods

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

Krinkle added a subscriber: Krinkle.Mar 9 2017, 4:35 AM

Getting this on https://www.mediawiki.org/w/index.php?search=Example

TextInputWidget: config.type='search' is deprecated. Use the SearchInputWidget instead. See T148471 for details.

  • MwWidgetsTitleInputWidget
    • MwWidgetsSearchInputWidget
      • OO.ui.infuse

Eeeks!

mw.widgets.SearchInputWidget is using config.type = 'search'. It's doing so as it inherits from mw.widgets.TitleInputWidget, which inherits from OO.ui.TextInputWidget. We can't have TitleInputWidget inherit from OO.ui.SearchInputWidget because not all of its uses are search related. I am not able to figure out an obvious way to fix this.

Hm, I guess we need to implement OO.ui.SearchInputWidget functionality in mw.widgets.SearchInputWidget. That shouldn't be too difficult.

Change 342718 had a related patch set uploaded (by Bartosz Dziewoński):
[mediawiki/core] mw.widgets.SearchInputWidget: Do not pass type: 'search' to TextInputWidget

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

I'm not really sure why mw.widgets.SearchInputWidget inherits from mw.widgets.TitleInputWidget, most of its code seems to be workarounds for its behaviors… oh well, some other time.

Change 342718 merged by jenkins-bot:
[mediawiki/core] mw.widgets.SearchInputWidget: Do not pass type: 'search' to TextInputWidget

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

Change 342773 had a related patch set uploaded (by Jforrester; owner: Bartosz Dziewoński):
[mediawiki/core] mw.widgets.SearchInputWidget: Do not pass type: 'search' to TextInputWidget

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

Change 342773 merged by jenkins-bot:
[mediawiki/core] mw.widgets.SearchInputWidget: Do not pass type: 'search' to TextInputWidget

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

Mentioned in SAL (#wikimedia-operations) [2017-03-15T18:34:13Z] <legoktm@tin> Synchronized php-1.29.0-wmf.16/includes/widget/SearchInputWidget.php: mw.widgets.SearchInputWidget: Do not pass to TextInputWidget - T148471 (1/2) (duration: 00m 41s)

Mentioned in SAL (#wikimedia-operations) [2017-03-15T18:35:32Z] <legoktm@tin> Synchronized php-1.29.0-wmf.16/resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js: mw.widgets.SearchInputWidget: Do not pass to TextInputWidget - T148471 (2/2) (duration: 00m 42s)

Krinkle removed a subscriber: Krinkle.Mar 18 2017, 3:07 AM