ProfessionalWiki / chameleon

Provides a highly flexible and customizable skin using Bootstrap 4
https://www.mediawiki.org/wiki/Skin:Chameleon
Other
115 stars 63 forks source link

Customize the bottom menu #359

Open pauco84 opened 1 year ago

pauco84 commented 1 year ago

Hi every one, I'm using Chameleon with the fixedhead layout.

I found out how to customize the bottom menu, so: I moved from the top menu the "Secondary-menu" down but I still have the tiny drop down symbol image

Is there a way to change it with the "dropup" one? Should I do something with the class of the element? (I tried to add at the end <component type="Menu" message="secondary-menu" class="dropup"/> but of course is not working.

Many thanks in advance, Paolo

malberts commented 1 year ago

I don't have a solution for this at the moment, but here's some info in case somebody wants to try something.


The dropdown class is hardcoded when using the Menu component: https://github.com/ProfessionalWiki/chameleon/blob/4001c399a2c2cfcd0d3da3f4ed4645c7ceff26d7/src/Components/Menu.php#L59-L61

Additionally, the class attribute coming from the layout XML is added to the a tag, not the dropdown div.

In the Toolbox component the class is added to the dropdown div: https://github.com/ProfessionalWiki/chameleon/blob/4001c399a2c2cfcd0d3da3f4ed4645c7ceff26d7/src/Components/NavbarHorizontal/Toolbox.php#L119-L121

Since these two different behaviors for class have been part of Chameleon for a while we need to be careful when coming up with a solution. Some people might be relying on the current behavior for styling purposes, so my initial feeling is we need to add a new attribute to the Menu component which allows specifying the direction, perhaps:

<component type="Menu" message="secondary-menu" direction="dropup"/>