Page MenuHomePhabricator

Search prototype stability
Closed, ResolvedPublic

Description

We're (ab)using a bunch of OOUI elements in the search prototype (T199120, https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseMediaInfo/+/441040) - using, extending or altering original OOUI components in a way they don't natively support.

Some examples:

  • The namespace selection dropdown/checkboxes are a pretty complex combination of a lot of different OOUI elements (CheckboxMultiselectWidget, CheckboxMultioptionWidget, GroupElement, PopupElement, DropdownWidget, ...) with a decent amount of alterations to make them fit together.
  • The search mode toggle (keywords, depicts, other statements) is not an existing OOUI element
  • The search element (input field, namespace widget, search button) has some hacks to make it appear as 1 combined element
  • The default OOUI input field has a slightly different padding/height than the OOUI TagMultiSelect (for depicts & statements capsules)
  • TagMultiSelect expands down when there are more capsules than can fit in the width/height of the input field - is that even ok?
  • The OOUI inputs/buttons/... have a height & font size that's larger than what we probably want in the location of the search bar
  • etc. etc.

As long as we're calling this thing a prototype, I'm not too worried about all of this, but if we want to get this to production, we'll need to go over a couple of things:

I'm not *too* worried about the JavaScript tying all of these things together, though we should go over things to figure out if we're using/extending from methods/properties that are likely to remain stable.
I *am* worried about a couple of the CSS hacks required to alter the default OOUI elements so that they look the way we want them to. E.g. some nasty hacks to adjust the height of elements in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseMediaInfo/+/441040/41/resources/search/SearchWidget.less

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Yes. Please do the things :) The move from prototype/alpha to real production-level code is necessary.

matthiasmullie claimed this task.

This was feedback on a WIP patch that has been updated to reflect this feedback.
The stuff listed here that is still relevant have their own tickets by now - others have been dealt with.
Closing.