Page MenuHomePhabricator

[WtC-M2] Replace WiKit's Dropdown component by Codex's Select
Closed, ResolvedPublic5 Estimated Story Points

Description

Problem

The Mismatch Finder's user interface was composed using a combination of Vue 2 custom components and WiKit elements, such as Dropdown. The WiKit design system is now on its deprecation path, as it has been superseded by Codex, the official Wikimedia design system. The utilization of WiKit components is not recommended, and they should be replaced in order to reduce maintenance costs and ensure consistency.

Solution

We have to replace WiKit's Dropdown component (used within the MismatchRow.vue component) by the Codex equivalent: cdx-select (Link to demo). This will take us a step closer to switching to the new design system and deprecating the old.

Results page
Mismatch row:
Screenshot 2023-09-22 at 16.14.23.png (2,664×1,400 px, 505 KB)
Acceptance criteria
  • The WiKit Dropdown component used in the Mismatch Finder is replaced by its Codex equivalent

Event Timeline

ItamarWMDE set the point value for this task to 5.Nov 13 2023, 9:15 AM

Looking great! Smooth replacement. No issues related with the Select were detected on Chrome 119, Safari 17 or Firefox 119.

⚠ Correction: I just detected an improvement we should probably make. Unlike in WiKit, the Codex Select has a predefined min-width of 256px (applied via .cdx-select-vue__handle). This makes the component overflow in our layout below a 462px viewport width:

Screenshot 2023-11-21 at 19.34.25.png (820×1,000 px, 128 KB)

I found that the easiest way to adjust the Codex Select to our layout for now might be to apply a 100% width to the Select itself (.cdx-select-vue), and replace the min-with applied via .cdx-select-vue__handle by a max-width (i.e. max-width: 256px). Would such an override be possible? Happy to adjust the solution if needed.

@Sarai-WMDE Great catch, thanks! I have applied your suggestions and they work like a charm :) Now, I will move the task to peer review again and will ping you for the final verification!

@HasanAkgun_WMDE can you please add a comment with links for the relevant PRs for this task? 🙏 for documentation's sake

Thanks! since both were merged feel free to move this to verification 👍