activeadmin/activeadmin

v4: nesting in menus

henrikbjorn opened this issue · 7 comments

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

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

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.

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

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

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

@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.

@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)