Page MenuHomePhabricator

Migrate MediaSearch to Codex
Open, In Progress, HighPublic8 Estimated Story Points

Description

As of Codex 0.10.0, we ought to have enough components in place to be able to migrate the Commons Special:MediaSearch page over to the new component library. This should be a very minor change from the perspective of users (in fact, many of the home-brewed Structured Data components used here went on to serve as the starting point for the equivalent Codex components) – there may be minor cosmetic shifts, but these will bring the feature more in line with the design system.

Despite the small user-facing impact, this work is important because MediaSearch is one of the last production features that still relies on the Vue 3 Compatibility build. Migrating MediaSearch to use Codex will improve UI consistency but it will also get us closer to where we can ship regular Vue 3 (w/o the compat build) everywhere in MediaWiki – an important task in terms of performance/tech debt.

Blockers

Here is a running list of blockers as I uncover them. Most of these are likely to be small.

  • T336954: TextInput: Emit a "clear" event when the clear button is clicked – MediaSearch has a custom search input (different enough from our existing search components: Typeahead, Lookup, SearchInput). We could at least migrate to the Codex TextInput for better visual consistency in terms of the embedded icons, etc. but the MediaSearch app relies on a clear event being emitted from the clear button (this is used as a signal to also clear all existing search results, something that does not happen during a normal text input event). (merged, and available in next Codex release)
  • T337429: TextInput: Add public blur() method The TextInput component exposes a public focus method to allow parent components to focus it automatically. The MediaSearch AutocompleteSearchInput component also expects to be able to programmatically blur the input element after a search suggestion has been selected/submitted.
  • T337442: Don't output ARIA attributes with "false" values in component markup – MediaSearch runs in the Vue 3 compatibility build, and it is currently throwing warnings about the fact that some Codex components provide "false" values as attribute bindings (meaning that the attribute w/false value appears in the rendered HTML in Vue 3 but not in Vue 2). By updating the appropriate places in Codex to use an explicit null value, we can ensure that these dead attributes don't get included in the rendered HTML.

Event Timeline

Restricted Application triaged this task as High priority. · View Herald TranscriptTue, May 16, 10:23 PM
Restricted Application added a project: Structured-Data-Backlog. · View Herald Transcript
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 862368 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/MediaSearch@master] Update linter settings and adjust files to match

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

Change 920385 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/MediaSearch@master] Add @wikimedia/codex depencency to extension.json

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

Change 920387 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/MediaSearch@master] Add @wikimedia/codex to devDependencies

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

Change 920389 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/MediaSearch@master] [WIP] Replace sd-button with cdx-button

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

Change 862368 merged by jenkins-bot:

[mediawiki/extensions/MediaSearch@master] Update linter settings and adjust files to match

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

egardner set the point value for this task to 8.Wed, May 17, 6:01 PM

Change 920774 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/MediaSearch@master] Replace sd-icon with cdx-icon

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

egardner changed the task status from Open to In Progress.Wed, May 17, 6:59 PM

Change 920798 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/MediaSearch@master] Replace sd-tabs with cdx-tabs

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

Change 921088 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/MediaSearch@master] Replace sd-radio and sd-checkbox with cdx-radio and cdx-checkbox

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

Change 922617 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/MediaSearch@master] Replace sd-message with cdx-message

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

Change 922901 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/MediaSearch@master] [WIP] AutocompleteSearchInput: Use cdx-text-input as basis for this component

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

egardner renamed this task from [Epic] Migrate MediaSearch to Codex to Migrate MediaSearch to Codex.Thu, May 25, 4:48 AM

Change 925085 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/MediaSearch@master] Vue: Disable compat mode on all components

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