iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: https://phabricator.wikimedia.org/T328149
⚓ T328149 LangSelector added to Mismatch Finder
Page MenuHomePhabricator

LangSelector added to Mismatch Finder
Closed, ResolvedPublic5 Estimated Story Points

Description

As a user of the Mismatch Finder I want to work with the site in my language.

Problem:
We currently only support language switching for our Single Page Applications (specifically Mismatch Finder and Query Builder) via URL parameter.

We need to also offer it via the UI as a LangSelector so that users can easily change the language of the page.

Screenshots/mockups:

Mock-up and specs are available in Figma

BDD
GIVEN the Mismatch Finder
AND Language Selector tool
WHEN a Mismatch Finder user wants to change the language of the page
THEN they are able to use the LangSelector to change the language of the page

Acceptance criteria:

  • The LangSelector is available on the Mismatch Finder

Notes
Investigation into language switching options for Single Page Applications (Mismatch Finder and Query Builder) T324653

Event Timeline

I just included a link to the initial design specifications in the task description. These outline the language selection flow in the context of the Mismatch Finder.



The specifications defining the visual and interactive features of the Language Selector component itself are available in this separate page in the file. Said specs are a synthesis of the original detailed documentation provided by the Language team, and the contents of the Design style guide.

Please check the questions shared in this comment in the parallel task T328148: LangSelector added to Query Builder. These might have an impact on the original specs.

@Sarai-WMDE Is this task ready to be picked up? It just dawned on us in task breakdown that we might not have tasks to pick up yet for this sprint, can this be pulled in if need be?

Hello! Yes. This is ready to be picked up if needed.

@Sarai-WMDE it's difficult to tell from the figma if the mobile version of the auth-widget has both items (username and logout button) aligned to the left or if they are to be aligned to opposite ends of the container in small screens. I implemented it according to the latter, which means with my (shorter) username it appears like this:

Screenshot 2023-07-20 at 13-58-41 Mismatch Finder.png (178×402 px, 8 KB)

If the former is preferred it requires getting rid of the justify-content rule in the media query of the .auth-widget class in AuthWidget.vue. (specifying as I probably won't be around to change it myself.)

@Sarai-WMDE it's difficult to tell from the figma if the mobile version of the auth-widget has both items (username and logout button) aligned to the left or if they are to be aligned to opposite ends of the container in small screens. I implemented it according to the latter, which means with my (shorter) username it appears like this:

Screenshot 2023-07-20 at 13-58-41 Mismatch Finder.png (178×402 px, 8 KB)

If the former is preferred it requires getting rid of the justify-content rule in the media query of the .auth-widget class in AuthWidget.vue. (specifying as I probably won't be around to change it myself.)

Since this does not relate to the language selector per se, I'd say this is out of scope for this task. If indeed the auth widget is not correctly aligned it should be addressed in it's own bug task.

Sorry for only reading this now and not making the alignment of the elements clearer. All elements should be aligned left (or right, depending on language orientation).

So yes, looks like this will need fixing.

On the other hand, it seems that the elements are moving under the logo based on a breakpoint, instead of following the same behavior implemented in the Query builder. Which was based on maintaining a minimum spacing between the logo and the LanguageSelector button:

Screenshot 2023-07-27 at 18.25.43.png (846×1 px, 192 KB)

We also should make sure to prevent the header links from wrapping:

Screenshot 2023-07-27 at 18.21.15.png (228×1 px, 41 KB)

Apologies, I did not have time to address these until now, will try to make corrections today or tomorrow

This looks all good to me!

Thanks so much :)

Hey @Arian_Bozorg. There are some fixes still required, which are related to the placement of the header elements and the language menu:

Screenshot 2023-08-03 at 13.56.41.png (764×702 px, 102 KB)

Should these be documented in a separate task, or should we reopen this ticket?

go ahead reopen it, I will submit a PR in a few minutes

The wrapping issues were resolved and merged, during work on this it was discovered that there is a bug with the options menu after wrapping and before the mobile breakpoint. Since there wasn't an obvious, easy, fix the bug is documented in T343563: [BUG][MismatchFinder] LanguageSelector options menu is not visible in some tablet sizes to be prioritized in the coming weeks.

Sorry I missed that, looks good to me now :)

And thanks for picking up the overflow issue Itamar!