-
Notifications
You must be signed in to change notification settings - Fork 821
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
FIX Flyout cms menu panels #4999
Conversation
I had no idea that hover flyout was a thing until now. :P |
Yeah I only found out about it by accident as it's used by https://github.com/silverstripe-australia/silverstripe-grouped-cms-menu :) I'm not sure the behaviour is documented or belongs in framework really... |
ping @tractorcow any thoughts on this one? |
@jonom I have a thought! I think that it should be removed from framework, and replaced in the IMHO CMS grouping should be core though, I'd be happy to write the code to support it for 4.0. |
@stevie-mayhew that would be my instinct too, but it wouldn't be very SemVer for this feature to disappear in 3.3 would it? There could be other people out there using it. I would have suggested removing it for 4.0 and moving the javascript to the grouped-cms-module but I agree with you that grouping should be a core feature so would much prefer that :) I find it very useful even on the most basic sites. |
Yeah definitely a 4.0 thing. @clarkepaul do you have any plans for this in 4.0 or should I just have at it? |
I've started updating the styles for the main menu as part of a hackday thing and haven't gone as far as doing anything for the nested level or any testing. For @chillu is this something which could accepted into core 4.0? To me this feels like the way to go, it provides more flexibility for the user experience. |
Glad to see this getting considered as a core feature! In the mean time though, appreciate if anyone can review this PR as a fix for the broken functionality in 3.3 - would be good to have it ready for a 3.3.1 release. |
Don't have any strong opinions here, but my feeling is that it shouldn't be in core if it can be cleanly supported through a module - which is what we're trying to achieve with React and component based styles. I don't think all CSS and JS behaviour can be considered part of the public API in terms of semver. It's a good goal to aspire to, but where do you draw the line there? So for the existing Back story from 3.0: Felipe designed his 3.0 screens with a nested menu, but we only got around implementing the CSS/JS side of it. The |
Okay so probably not a SemVer violation if we don't patch it. Yes, should be possible to fix this in grouped-cms-menu instead. Rather than just close this PR, should I change it to remove the broken code instead of fix it? Should prevent conflicts and no point leaving in something that doesn't work right? On whether or not this should be a core feature for 4, my point of view is that we already support hierarchy / deep nesting for menus in individual sections (via form tabs), so it feels like we should provide the same level of support for the main menu. So if not a core feature I think it is a good candidate to be one of the SS Ltd officially supported modules at least. |
Totally agree with @chillu about making things more modular, and 👍 to what @jonom says about it being something potentially supported as a "approved module" or whatever it is. We've had no issues with it in 50 or some stupid number of sites so I'd consider it pretty stable. Happy to upgrade and pull out the functionality relied on from SS core currently to make it standalone. |
@stevie-mayhew are we both talking about this module https://github.com/silverstripe-australia/silverstripe-grouped-cms-menu or does Little Giant have something similar? :D either way very happy for you to have at it! |
@jonom we are both talking about the same thing 👍 Should we sneakily make the entire menu system React? |
@stevie-mayhew I think that would actually be a great start to getting into the SilverStripe-way of writing React components, and validate our approach. So you could rewrite /cc @flashbackzoo |
👍 Woohoo that would be great @stevie-mayhew! You know if you do decide to do this and keep some notes while you're working on it, it might make a great blog post. I have no React experience currently so would be really interested to read through your process and any gotchas etc. you encounter, and as @chillu says would be a great way to validate the approach. Could be a good case study on how to adapt components from SS3 to SS4. |
@vinstah was trying to finish off the flyout menus (using Entwine) last week. I think trying to implement the menu in React, at this stage, will lead to much frustrations. There are a lots of interactions with Entwine there, which can be managed, but would be better attacked further down the track. @chillu remember the fun we had with GalleryField last year? 😜 The asset admin module https://github.com/open-sausages/silverstripe-asset-admin/tree/pulls/add-routing might be a better place to start hacking. /cc @ianherbert |
Where are we at with this guys, should I update this PR to remove redundant/undocumented code or just close it? |
I've styled the nested nav items to go with the newer v4 styles of the menu and @scott1702 was going to squash it for me. @scott1702 where is that going to get merged into? I take it my changes could then be removed into the module itself. For my design it would work best if the group had the icon (rather than the nested items) but I wasn't sure how to set that up. |
Yeah I really like that design with an icon on group only. Looks quite cluttered currently with an icon for each child. I added icon support for the grouped cms menu module recently but did it in a bit of a dumb way - I didn't realise there was an API for setting icons on LeftAndMain menu items so would be good to make it more consistent. That's probably something to consider either for 3.4 or 4 depending on where those updates are headed, in the mean time the grouped-cms-menu module needs a fix to be compatible with 3.3. @stevie-mayhew did you have time to have a look at that? Will close this since we seem to have decided to fix in module instead of here. |
Made a merge request for the styles #5161 |
Hi guys, I'm re-opening this because I think it should be considered a bugfix after all. We know at least one popular module relies on this functionality and see this description from the top of LeftAndMain.Menu.js:
I would say that's more documented than hidden, so removing the flyout functionality in 3.x seems anti-SemVer to me - we could leave it untouched here of course but then it's difficult to fix this in the grouped-cms-menu existing behaviours in Framework could cause conflicts. The functionality is currently broken for me on some sites but not others - I can't trace the reason for this discrepancy but this updated code works everywhere for me. Happy for this to be removed from 4 although I do think grouping menu items together is a pretty basic feature, and we allow this within form interfaces so why not the main menu? What I think would be really cool is if CMSMenu and FieldList shared a common interface and API for nesting and reorganising items. Think it would be really useful if we could choose a field or menu item and say 'move to this tab', or grab a tab/section and say 'put this in front of this other tab'. |
The hover flyout functionality for nested CMS menu items seems to be broken in 3.3. Seems to be failing because behaviour was added with regular jquery (just once at runtime) rather than using entwine.