Skip to content
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

4.0.0.beta4 nesting in menus #8245

Open
henrikbjorn opened this issue Jan 29, 2024 · 6 comments · May be fixed by #8225
Open

4.0.0.beta4 nesting in menus #8245

henrikbjorn opened this issue Jan 29, 2024 · 6 comments · May be fixed by #8225

Comments

@henrikbjorn
Copy link

Trying the new beta on a larger Rails project with many admin resources with nesting in menus.

Expected behavior

Previously a dropdown menu would appear on hover and clicking on it, would take you to that resources index page.

Actual behavior

This does not happen in v4. It will just toggle the nested menu and no navigation will happen.

How to reproduce

  1. Create an Blogs resource
  2. Create BlogPost resource and set menu parent: 'Blogs'
  3. It is now impossible to navigate to Blogs admin index page via the menu
@tagliala
Copy link
Contributor

Hello, is this the same issue described at #8239 (reply in thread)?

@henrikbjorn
Copy link
Author

Hello, is this the same issue described at #8239 (reply in thread)?

Not sure. They are discussing belongs_to and navigation_menu which we don't use.

I tried with master and the demo app bin/rake local server.

To see what I mean add the following to app/admin/tags.rb menu parent: 'KitchenSink'. Now it is impossible to get to the KitchenSink page.

In previous releases it would just show the dropdown for the menu but still allow clicking KitchenSink and be navigated to that page.

@henrikbjorn
Copy link
Author

Skærmbillede 2024-01-29 kl  15 25 18

See the bottom left corner of the window, where it shows the link href,

@tagliala tagliala changed the title 4.0.0.beta4 4.0.0.beta4 nesting in menus Jan 29, 2024
@mgrunberg
Copy link
Contributor

@henrikbjorn thanks for opening the issue. PR #8225 fixes this.

@tagliala tagliala linked a pull request Jan 29, 2024 that will close this issue
@javierjulio
Copy link
Member

@henrikbjorn thank you. I'd fine with reporting this as a breaking change for the v4 release as I don't have any plans to resolve this. Perhaps though, we can consider what's necessary to allow others to implement this behavior themselves but I don't think the library should support it by default with the new collapsible menu. Sorry.

@henrikbjorn
Copy link
Author

@javierjulio I think this should be supported since it is a nice way of grouping related admin resources (Which we do a lot).

I also think it is a logical thing to think is supported. Like with a Blogs admin resource have Tags and Categories with Blogs as the parent (without belongs_to)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants