-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Fixes menu issues & some UI for Joomla 4.0 (beta) #19320
Conversation
Handles Civi menu top & bottom, Joomla side menu expanded & shrunk, at three viewports.
(Standard links)
|
This looks great visually, but I'd like to suggest some code restructuring. A little background:
Based on that, I recommend:
|
Thanks. Not all of this relates to menus - the first 4 selectors are other bits of J4 tidying. Can they stay in the Joomla.css file? I didn't know there were breakpoint variables - where are the :root variable values defined out of interest? |
It's not true SCSS just fairly simple civicrm-core/CRM/Core/Resources.php Lines 482 to 493 in 87edc8d
But the civicrm-core/CRM/Utils/System/WordPress.php Lines 987 to 992 in 9431cbf
|
The only 2 styles I see in your diff that are not menu-related are: body.admin.com_civicrm.layout-default #subhead {
display: none;
}
body.admin.com_civicrm.layout-default #content > .row > .col-md-12 {
padding: 0;
} The rest appears to be related to the menubar or the space it displaces. |
Very nice - it looks like this is only accessible to the menubar css files? Can think of some other areas it would be useful, like form labels. is the cascade order of the various css files set anywhere? When theming, focusesing on
Fair point - and #subhead is really about space displacement too. As Joomla 4 isn't at Release Candidate yet – and the admin theme is unpopular enough to maybe face bigger changes, maybe best to wait a bit with implementing this further, especially with other outstanding Joomla 4 issues. |
Yes, the more general |
Did this reach a conclusion? Seems like an improvement even if further changes are needed later. |
@vingle are you able to make the suggested changes? |
those aren't quick changes for me to make I'm afraid. it's on a list to do once Joomla 4 is at Release Candidate (and they might change their admin theme before in which case it would need redoing anyway). |
Ok marking this PR as WIP for now. |
I could just put most of this in the menubar-joomla.css and make a new PR? Arguably the J3 to 4 jump isn't as big as D7 to 8 - so maybe doesn't need its own css file (like WP 4 to 5 didn't)? Also, there'd be a bunch of selectors in the v3 that will still be needed in the v4 so splitting the file makes this a bigger job to try to figure what is needed for 4 and what isn't. |
@eileenmcnaughton that's true. But more than that - perhaps because I've not seen the background to this convention, I don't understand the advantage of having menubar-joomla3 and menubar-joomla4 - which will contain both much of menubar-joomla3 and this PR. It sounds like duplication of css - and a bit of work ontop of this PR to figure what isn't needed in menubar-joomla4 from menubar-joomla3. |
@vingle OK - that makes the blocker clear - I'm gonna take a stab that the goal was to have new code for joomla 4 without impacting joomla3 (I'm not sure whehter that is out of caution or because there is reason to think it would have an impact) Assuming we want to be able to develop css for j4 without having to worry about the impact on j3 then it would not necessarily require separating out - all the j3 stuff could be duplicated into the j4 file - with code comments making the difference between deliberate j4 stuff & copy & paste so that future editors can go 'oh they didn't make an intentional decision to add this so it's easy to make a case to remove it) Obviously @colemanw can clarify better than I can |
Yes that makes sense, tho that's why I prefixed the new css with
|
OK - let's see if your last comment changes @colemanw's understanding of the best approach |
I think there's a trade-off. You are correct that there would be some duplication of code between the J3 & J4 css files. |
That said, I don't want to block these fixes from going in, so go ahead with your other PR. |
Thanks @colemanw & @eileenmcnaughton, I've just made a new PR here: #20401 - so feel free to close this. I ended up redoing the css from this PR - and changing the below-menu position slightly to limit future problems if the sidebar gets a new width. I do agree with the goal of trying to clean up some of the mountain of legacy css; and did realise while doing this how having separate joomla3.css and joomla4.css would be a nice chance to start that, but it requires more time. Changes are all under a |
Actually.. just realised I can close this! |
Handles Civi menu top & bottom, Joomla side menu expanded & shrunk, at three viewports. Tested on Joomla 4 Beta 5 with Civi 5.32.2 & Joomla 3.9.23 for regressions.
Overview
Joomla 4 has a new admin theme. This PR integrates CiviCRM, notably the Civi Menu, with it, at desktop, mobile and tablet widths. Also removes padding around content container.
Before
After
Technical Details
This targets Joomla 4.0 with the body class
.layout-default
, iebody.admin.com_civicrm.layout-default
and this seems to avoid impacting Joomla 3.x, which usesbody.admin.com_civicrm
. If there are parts of Joomla 4 or CiviCRM on Joomla that don't use.layout-default
(haven't seen one yet), then these changes wouldn't work.Comments
The Joomla sidebar takes up a lot of room at mobile viewport, might be worth hiding at max-width: 767px (same for Joomla 3.x - which could also benefit with less padding at mobile width).