-
Notifications
You must be signed in to change notification settings - Fork 10
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
Yes!! So glad this exists! #1
Comments
@Swingline0 Thanks for the feedback, glad you like my tweaks!
No, it's not just you - I find it both awful UX and verging on rudeness. But then, in mitigation, I have to remind myself that CiviCRM started off as standalone software and perhaps accommodating CMSs has been something of an afterthought. There is also a consistency across CMSs which I suppose is useful. Your suggestion (1) is probably the most achievable, as you say, though I'd prefer to reverse the order and have the Civi menu below the WordPress one, perhaps even containing it within the The main problem with all of this is the archaic menu system that Civi uses. It is mind-bogglingly dreadful. Have a look at the markup if you dare - it's not even a nested list! My temptation is to kill it completely and rebuild the items in the WordPress menu bar with a "CiviCRM" top-level item - perhaps to the right hand side. Or, as you suggest in (3), rebuild in the left-hand menu - though I've never seen items more than one sub-level deep implemented there. In my view, the blocker to any effort in this regard is that there is (or has been) a push to use Bootstrap to theme Civi: for example here and here. I would therefore assume that the menu would be part of any such overhaul. Which is why I just did my best to polish what's already there and wait for things to shake out. |
Glad to know I don't simply have unwarranted, high standards 😄 I'd agree with you on all fronts here. Stacking the WP menu above the Civi menu makes perfect sense. At that point, I would personally prefer it be visible in all views of the dashboard instead of only when already in the Civi context. I know you've taken specific steps to avoid loading all the heavy Civi resources on all admin pages so perhaps this could be an optional setting? I'd love to pursue the path of integrating Civi's menu into the native WP navigation bar as well. I haven't come across or found any accounts of 3+ level deep menus in WP though. Needless to say, might be worth a test to see how it affects UX. The greater unknown for me I suppose would be how/where the markup for the menu is generated and how hookable this is. Any direction you might be able to point me in? I haven't checked the output of this method but would invoking |
No, The best I could find for returning markup is What we're really after is a nested array, which requires a bit of jiggery-pokery: $navigation = array();
CRM_Core_BAO_Navigation::buildNavigationTree($navigation, $parent = NULL, true);
print_r( $navigation ); die(); Hey presto, we have our nested array, but we'd still have to parse it for permissions and translations before creating the WordPress menu items. Hope that helps! |
Interesting topic. I'm currently toying with approaching this from a different direction for a client and using pro version of this plugin https://wordpress.org/plugins/admin-menu-editor/ that allows complete editing or both side and top WP menus + assigning permisions to them, with the idea that I basically manually recreate all the CiviCRM menu trees in WP using this plugin, then use WP Members and Groups plugins (with your CiviCRM members sync plugin) to ensure menu permissions pretty much match those set in CiviCRM. Then disable default CiviCRM menu, or mayve only leave for SuperAdmin. Assuming any of that makes sense, I'm wondering whether a future plugin could sync a custom menu added to WP with the one in CiviCRM or even preload the clone when installed. |
@redactuk Please keep us in the loop on your progress with this. I heard there are plans to revamp Civi's menu, but don't know if any actual work has been done. I suspect a lot of people would be happy to ditch the current menu in favour of a WordPress-native one. |
Hi, it's been more than a year since anything has been added. I'm curious to see if more activity is likely. In the plugin I also see an option for "Upgrade CiviCRM" but no text or explanation of the functionality that results from ticking the box. I may give it a try, but would appreciate some description as well. Thanks for your work on this. DVHirst |
@dvhirst I don't see any progress being made on upgrading the CiviCRM menu anytime soon, to be honest. If I get a project that requires it, I'll obviously include the code here.
It's just a convenient link to the CiviCRM upgrade screen. You'll need to have an updated CiviCRM codebase in place for it to do anything. Cheers, Christian |
@dvhirst It just occurred to me that you might be asking about the plugin more generally rather than addressing this issue in particular. If so, the reason there have been no updates is that there has been no need for any. Do please open a new issue if you find anything amiss with the current plugin. Cheers, Christian |
@Swingline0 The |
I'd like to point your attention to the ongoing work to overhaul the CiviCRM menu: https://lab.civicrm.org/dev/core/issues/487 |
@colemanw Thanks, but KAM also requires overrides in a WordPress context - and this plugin already implements them. See this file for the current set of fixes. Integrating these overrides into core would be nice, but then we're back to detecting the host CMS and including a file or targeting a WordPress-specific DOM element in each CSS declaration. For now, it seems to me, locating the fixes in this plugin seems like a good compromise. |
Well, let me put it this way: as a Core maintainer, I want users to have a good experience of unboxing CiviCRM, rather than installing it, finding that some things don't work right, and having to discover this secret plugin to get those things working (or maybe never finding out about this secret and giving up on Civi in frustration). |
@colemanw You are of course welcome to migrate any code you see fit to core. This plugin will continue (as it does now) to support whatever core decides to implement, though it's worth remembering that an additional advantage of this plugin is that the fixes included in it also apply to all previous releases of core. |
FWIW, this plugin is far from secret - it's available on the WordPress Plugin Directory (giving CiviCRM visibility there) and is installed on more than 20% of CiviCRM/WordPress instances according to CiviCRM's stats. |
Not trying to put this plugin down in any way, just thinking like an end user, and wanting to make sure the 80% of people who haven't discovered this plugin are still able to have a good experience using CiviCRM. |
Hey @christianwach -- EranSch from the CiviCRM forums here.
I've gotta say that I'm thrilled that this plugin exists. From the first moment I used CiviCRM I've been wanting to implement a few style corrections at the very least. This is beautiful! 😄
I've often pondered further about what could be done to help the Civi menu integrate more appropriately with WordPress. I've been trying to imagine what would be ideal. From a usability standpoint, I hate how the civicrm menu obscures the WP Admin Bar and I'd like to explore some other options. Have you given any thought to alternatives to explore as well? Is it just me?
Three options seem prevalent to me...
Any other thoughts on what could work nicely?
The text was updated successfully, but these errors were encountered: