Page MenuHomePhabricator

Create and publish a renderless language selector component
Open, Needs TriagePublic

Description

To replace the current Universal Language Selector with a modern, responsive, Vue based language selector, @Pginer-WMF came up with a new design - T253303: Basic support for a responsive language selector.

The section translation feature of Content translation will be implementing it soon, but we were thinking how to build it in a way so that it is reusable elsewhere. Due to the early stage status of Vue adoption and variety of Vue setups(build, non build, wvui based etc), this is slightly complicated.

The best solution we can propose is a renderless vue component. I did a proof of concept.

A brief introduction to Renderless component: https://adamwathan.me/renderless-components-in-vuejs/

A consumer of the library is free to write the UI - whether it is a dialog or embedded in page, or simply a dropdown or have additional button using a convinient UI framework - all flexibility is there.

I propose publishing this as a standalone Vue component and WVUI, CX3, or any projects depend and build UI as per their need, but follow @Pginer-WMF's design.