? ? Success

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
8 Feb 2016

This improvement adds a new parameter to let display a bootstrap dropdown with flags and language names instead of the older dropdown. It is B/C. Test on Protostar. Beez3 is untouched by adding an override.
It was requested by many users on the forums.
Until now choosing dropdown display we would get:
screen shot 2016-02-08 at 12 17 43

New parameters in the language Switcher:

screen shot 2016-02-08 at 12 09 18

Results in frontend

screen shot 2016-02-08 at 12 08 10

screen shot 2016-02-08 at 12 11 04

if choosing Yes to decrease line height:
screen shot 2016-02-08 at 12 12 17

@andrepereiradasilva
@dgt41

avatar infograf768 infograf768 - open - 8 Feb 2016
avatar infograf768 infograf768 - change - 8 Feb 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Feb 2016
Labels Added: ? ?
avatar brianteeman brianteeman - change - 8 Feb 2016
Category Modules Multilanguage
avatar brianteeman brianteeman - change - 8 Feb 2016
Labels
avatar andrepereiradasilva
andrepereiradasilva - comment - 8 Feb 2016

Cool, nice PR! Will test as soon as i have time.

As a suggestion: a similiar thing would be cool for the backend language selectors! (in a new PR of course)

avatar richard67 richard67 - test_item - 9 Feb 2016 - Tested successfully
avatar richard67
richard67 - comment - 9 Feb 2016

I have tested this item :white_check_mark: successfully on 032bc44

Tested with success, works as described, also with reduced line height.

@infograf768 I'd like to ask 2 things:

  1. Since the new option is only relevant if option "Use Dropdown" is true ("Yes"), should it not be moved to the bottom so it appears below the header "If Use Image Flags is set to 'Yes', the display options below will be ignored"? Otherwise, if it is like now, the text "Use Dropdown With Flags" could be a bit misleading, because it sounds as if it was an alternative to "Use Dropdown" and not an additional option for the dropdown. Something like "Use flags for dropdown" could be maybe more clear. Maybe @brianteeman has a suggestion for a better text in that case (position of the new option in GUI as shown in your screenshots).

  2. I have not tested it with RTL direction. From my point of view, the flag should appear right beside the language name and all should be right aligned in case of RTL. Does it work like this?


    This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9084.

avatar infograf768
infograf768 - comment - 9 Feb 2016

Looks like
"Use Flags For Dropdown" is a good idea.
In fact also, as "Active Language" is used both when Dropdown with flags and Images only, it would need a different UI.

I think the best may be to use the new "showon" field parameter. See: #8524

WIP :smiley:

avatar andrepereiradasilva
andrepereiradasilva - comment - 9 Feb 2016

IMHO mod_languages options should be reviewed.
There are a lot of text that is not needed if you use showon.

Some time ago i started working on that, but then i had other PRs to worry.
@infograf768 see andrepereiradasilva@9398442 if you want to use something. It's not tested and i don't recall where i left it, or even if it's BC.

avatar richard67
richard67 - comment - 9 Feb 2016

@infograf768 I meanwhile have set up Arabic language for tesing RTL, and it seems that for each language in the list, the position of the flag depends on the RTL of the particular language in the list, and not on the RTL of the current langue, see adjusted screen shots:

screen shot 2016-02-09 at 05 37 19screen shot 2016-02-09 at 05 37 20

Is this desired?

I would guess no. From my point of view the position of flags in the list should be according to the alignment of the list, i.e. if current language is RTL, flags of all languages in the list should be on the right side, and if current language is LTR, flags of all languages in the list should be on the left side.

Or am I wrong, or did something wrong when setting up the Arabic language, or do I not understand the desired behavior?

Please let me know if ok or not, so I can alter my test result if necessary.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9084.

avatar infograf768
infograf768 - comment - 9 Feb 2016

@richard67

Will deal with rtl matter.
@andrepereiradasilva
Now working on showon

avatar andrepereiradasilva
andrepereiradasilva - comment - 9 Feb 2016

Now working on showon

No changes in this PR. Forgot to sync?

Update: Sorry. Misunderstood your comment. You are working ON it now. Right!

avatar joomla-cms-bot
joomla-cms-bot - comment - 10 Feb 2016

This PR has received new commits.

CC: @richard67


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9084.

avatar infograf768
infograf768 - comment - 10 Feb 2016

Here is the new interface:

Use dropdown (as in the past)
screen shot 2016-02-10 at 09 54 14

Yes to Flags for dropdown
screen shot 2016-02-10 at 09 56 19

Do not use dropdown as well as do not use Image flags
screen shot 2016-02-10 at 09 57 46

No to dropdown and yes to Image flags
screen shot 2016-02-10 at 09 58 49

avatar andrepereiradasilva
andrepereiradasilva - comment - 10 Feb 2016
Test 1: Only dropdown (chosen)

Use Dropdown: Yes | Use Flags For Dropdown: No

Problems found: none.

Test 2: Dropdown with images (bootstrap)

Use Dropdown: Yes | Use Flags For Dropdown: Yes

Problems found: chosen.css is loaded but is not needed.

Test 3: Language flags (images)

Use Dropdown: No | Use Image flags: Yes

Problems found: chosen.css is loaded but is not needed.

Test 4: Language text selector (text)

Use Dropdown: No | Use Image flags: No

Problems found: chosen.css is loaded but is not needed.

Conclusion

Didn't test RTL and beez3.
The rest is just small adjustments needed in loading chosen.css.
Nice work @infograf768.

avatar infograf768
infograf768 - comment - 10 Feb 2016

Chosen.css is at this stage always loaded as your PR ( #9087 ) has not been merged.
If it had been, I would have changed the conditional to
if ($params->get('dropdown', 1) && !$params->get('dropdownimage', 0))

concerning

Test 1: Only dropdown (chosen)

Use Dropdown: Yes | Use Flags For Dropdown: No

Problems found:

    "Active language" = "No" doesn't remove the active language
    "Active language" = "Yes" doesn't add the lang-active class to the option.

This is normal and these parameters are useless in a "normal" select box. This is why they are hidden. This is the same as former behavior when dropdown was used.

avatar infograf768
infograf768 - comment - 10 Feb 2016

Indeeed a small issue as Active language shows when Dropdown to Yes and Use flags for dropdown to no. Will try to correct.

avatar infograf768
infograf768 - comment - 10 Feb 2016

Hmm, it seems that the showon there is fine. But at random, the Active Language field displays.

avatar andrepereiradasilva
andrepereiradasilva - comment - 10 Feb 2016

Let's see your showon for "show_active" is showon="image:1[OR]dropdownimage:1[OR]dropdown:0"

Shows if:

  • dropdown:0 (chosen dropdown)
  • OR dropdownimage:1 (bootstrap dropdown with image flags)
  • OR image:1 (image flags)

Is not random is when you have (Use Image Flags) set to Yes = image:1
The option could be hidden but setted to 1.

avatar infograf768
infograf768 - comment - 10 Feb 2016

I meant I got sometimes the Active Language field displaying although the showon is OK.
Anyway my branch has conflicts. Will create another PR.

avatar infograf768
infograf768 - comment - 10 Feb 2016

Please test again in #9095

avatar infograf768 infograf768 - change - 10 Feb 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-02-10 12:16:44
Closed_By infograf768
avatar infograf768
infograf768 - comment - 10 Feb 2016

replaced by

#9095


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9084.

Add a Comment

Login with GitHub to post a comment