? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
20 Aug 2019

Following on #25929

Summary of Changes

Adding similar code from #25929 in mod_submenu to get the badges

Testing Instructions

Create a multilingual site. use multilingual sample data.
Click on the dashboard icon on the Menus line in the sidebar menu.

Before patch

No badges for Menus containing a Home menu item.

Screen Shot 2019-08-20 at 14 45 54

After patch

Badges are now displayed.

Screen Shot 2019-08-20 at 14 46 23

avatar infograf768 infograf768 - open - 20 Aug 2019
avatar infograf768 infograf768 - change - 20 Aug 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Aug 2019
Category Modules Administration
avatar infograf768 infograf768 - change - 20 Aug 2019
Title
[4.0][Admin template] Menu Dasboard: Display language badge for menus containing home
[4.0][Admin template] Menu Dashboard: Display language badge for menus containing home
avatar infograf768 infograf768 - edited - 20 Aug 2019
avatar brianteeman
brianteeman - comment - 20 Aug 2019

Is it just me that finds this confusing.
Looking at the screenshots I read it as showing Fr-fr on any french menu. Its not clear that its only for the menu that contains the default menu item for the french language

avatar infograf768
infograf768 - comment - 20 Aug 2019

Looking at the screenshots I read it as showing Fr-fr on any french menu. Its not clear that its only for the menu that contains the default menu item for the french language

This is done by multilingual sample data on purpose.
The badges concern menu with homes

avatar brianteeman
brianteeman - comment - 20 Aug 2019

I think/hope you misunderstand me as I wasnt clear - trying again

Looking at the screenshots I read it that the new badge FR-fr should show on any french menu. Its not clear that its only for the menu that contains the default menu item for the french language

just a suggestion but perhaps display the Star and the badge perhaps on the default menu for that language

or even better display the badge on all menus that are language specific and the badge + star on the default

avatar infograf768 infograf768 - change - 20 Aug 2019
Labels Added: ?
avatar infograf768
infograf768 - comment - 20 Aug 2019

You still don't understand.
The code between parenthesis (fr-FR) in for example Menu Auteur (fr-FR) is resulting from multilingual sample data.
The specific badges JUST concerns Menus which contain a home whatever the language, including a Main Menu containing a Home with language All.
These badges replace the flags we have in 3.x.
Same for the Sidebar Menu...

avatar brianteeman
brianteeman - comment - 20 Aug 2019

I absolutely understand - pretend that sample data is not being used or the menus do not have the text in parenthesis. I am only talking about the badges

avatar infograf768
infograf768 - comment - 20 Aug 2019

A menu may have any name and contain any type of menu items.
For example, I can have a menu called Special which will contain menu items tagged to various languages and which module is tagged to ALL and therefore display whatever the Content Language in use...
This is purely the decision of the user to give a name to a menu.
Usually in a multilingual site, clever users give a title in the same Content Language if all items and module are tagged to that content language.
Or use the parenthesis trick when obvious.

Please let's not reinvent the wheel. This is a loss of time.

avatar jeckodevelopment
jeckodevelopment - comment - 23 Aug 2019

Basically, from my understanding, the badges are now displayed instead of displaying the flag as we do in 3.x
Rigth?

avatar jeckodevelopment
jeckodevelopment - comment - 23 Aug 2019

What happens if we have different language homes in one menu?

In J.3 you can't have more than one home in a menu.

avatar HLeithner
HLeithner - comment - 23 Aug 2019

Yes but we had a discussion to change this. There is no technical reason why we should have only one language home menu item in a menu.

That's the reason I ask.

avatar infograf768
infograf768 - comment - 23 Aug 2019

@jeckodevelopment

Basically, from my understanding, the badges are now displayed instead of displaying the flag as we do in 3.x
Rigth?

Exactly, same we are now getting for the Sidemenu:

Screen Shot 2019-08-23 at 15 36 36

@HLeithner

There is no technical reason why we should have only one language home menu item in a menu.

Indeed there was a discussion and nothing concrete was proposed... as it would be extremely confusing imho (one would never know in which menu is a specific Home).
Also, we would have in the same Menu all menu items for the languages with Home that should be displayed by this Menu.

This patch has the merit of being consistent with what we have now.

avatar richard67
richard67 - comment - 24 Aug 2019

I've tested, and I've also tested what happens when we have more than 1 home in 1 menu, e.g. the "all languages" and the French homes in the "Main Menu".

  1. Without this PR applied:

Unbenannt-1

  1. With this PR applied:

Unbenannt-2

And in the menu we get with and without this PR:

Unbenannt-3

As you can see we have duplicate entries for "Main Menu" in any case, but in fact it is only 1 menu.

So this PR here does not introduce any new problem with it.

And so solving display of menus with multiple homes is another issue which should be solved as soon as there is a decision if such thing shall be officially supported.

avatar richard67 richard67 - test_item - 24 Aug 2019 - Tested successfully
avatar richard67
richard67 - comment - 24 Aug 2019

I have tested this item successfully on 2f5bda6


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

avatar HLeithner
HLeithner - comment - 24 Aug 2019

maybe a dump question but wouldn't it look better if the language tags are right aligned?

avatar infograf768
infograf768 - comment - 25 Aug 2019

maybe a dump question but wouldn't it look better if the language tags are right aligned?

We could reach this goal by adding a float: right; margin-right: 1rem; (float: left; margin-left: 1rem; in rtl to the badge . This means creating a new class.

  .home_badge {
    float: right;
    margin-right: 1rem;
  }

Then we would get this

Screen Shot 2019-08-25 at 08 31 43

If it is what you want I can do.
I just wonder in which scss I should add the new class. In _sidebar.scss ?

Note: I would not do that type of change in the sidemenu as it is already very narrow.
Also, remark that the star for the main Menu containing the Home set to ALL is not perfectly aligned.

avatar richard67
richard67 - comment - 25 Aug 2019

No, right-aligned doesn’t really look better.

avatar HLeithner
HLeithner - comment - 25 Aug 2019

yeah seams not much better

avatar infograf768
infograf768 - comment - 27 Aug 2019

@HLeithner
Please get this one in as there are going to be some changes for mod_submenu

avatar HLeithner
HLeithner - comment - 28 Aug 2019

Thanks adding badges back.

avatar HLeithner HLeithner - close - 28 Aug 2019
avatar HLeithner HLeithner - change - 28 Aug 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-08-28 07:00:36
Closed_By HLeithner

Add a Comment

Login with GitHub to post a comment