Page MenuHomePhabricator

QueryBuilder: Create basic one column LanguageSelector component
Closed, ResolvedPublic

Description

Implement the first three steps of the parent task:

  • Create a new component in the QB components directory
  • Take a look at the Vue Language Component made by the Language team, to try and see which patterns can be reused
  • Basic Markup is added and rendered from a languages prop (and message of unavailable language) including CSS states (Menu Item States in the Figma file)

Note: there is also a columns prop that takes 'one' or 'three' as input

This PoC can be used as a base to build the component.

Event Timeline

guergana.tzatchkova renamed this task from Create basic one column LanguageSelector component to QueryBuilder: Create basic one column LanguageSelector component.Feb 13 2023, 10:33 AM
guergana.tzatchkova claimed this task.

Change 889547 had a related patch set uploaded (by Guergana Tzatchkova; author: Guergana Tzatchkova):

[wikidata/query-builder@master] Add markup and styles for LanguageSelector component

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

Change 889966 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[wikidata/query-builder@master] Proposal: Manage language filtering inside LanguageSelector

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

Change 890395 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[wikidata/query-builder@master] Proposal: Use actual <button> for clear button

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

Change 890396 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[wikidata/query-builder@master] Proposal: Make clearBtnVisible computed

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

Change 889966 abandoned by Lucas Werkmeister (WMDE):

[wikidata/query-builder@master] Proposal: Manage language filtering inside LanguageSelector

Reason:

squashed into I507187e081

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

Change 890395 abandoned by Lucas Werkmeister (WMDE):

[wikidata/query-builder@master] Proposal: Use actual <button> for clear button

Reason:

squashed into I507187e081

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

Change 890396 abandoned by Lucas Werkmeister (WMDE):

[wikidata/query-builder@master] Proposal: Make clearBtnVisible computed

Reason:

squashed into I507187e081

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

@Arian_Borzog @karapayneWMDE Please check the visual implementation of the base elements of the component LanguageSelector. The component has been added to the screen for now just so you can review it, but it will be not be merged into the code. The component will be added with the button and correct position in another task: T328148 . Please note that this version doesn't include the mobile version, keyboard navigation or RTL behaviour, those features will be added in subsequent tasks.
https://889547--clicky-sparqly.netlify.app/

Hi @guergana.tzatchkova :)

Just a couple of sizing amendments on this.

It looks like the padding on the bottom of the search is a little too high, it should be 16px.
Here is a screenshot to illustrate:

image.png (318×661 px, 25 KB)

And it looks like the dimensions of the search box are a little off too, it should be 384 x 52px.
I think the height will be fixed when the padding is amended.

The rest looks great!

Thanks so much :)

Change 889547 merged by jenkins-bot:

[wikidata/query-builder@master] Add markup and styles for LanguageSelector component

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