User tests: Successful: Unsuccessful:
Following on #25929
Adding similar code from #25929 in mod_submenu to get the badges
Create a multilingual site. use multilingual sample data.
Click on the dashboard icon on the Menus
line in the sidebar menu.
No badges for Menus containing a Home menu item.
Badges are now displayed.
Status | New | ⇒ | Pending |
Category | ⇒ | Modules Administration |
Title |
|
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
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
Labels |
Added:
?
|
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...
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
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.
Basically, from my understanding, the badges are now displayed instead of displaying the flag as we do in 3.x
Rigth?
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.
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.
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:
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.
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".
And in the menu we get with and without this PR:
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.
I have tested this item
maybe a dump question but wouldn't it look better if the language tags are right aligned?
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
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.
No, right-aligned doesn’t really look better.
yeah seams not much better
@HLeithner
Please get this one in as there are going to be some changes for mod_submenu
Thanks adding badges back.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-08-28 07:00:36 |
Closed_By | ⇒ | HLeithner |
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