mui / mui-toolpad

Toolpad: Full stack components and low-code builder for dashboards and internal apps.
https://mui.com/toolpad/
MIT License
954 stars 240 forks source link

[core] Routing behaviour for nested pages #3934

Open prakhargupta1 opened 3 weeks ago

prakhargupta1 commented 3 weeks ago

Steps to reproduce

With a nested page and no page container, I was unable to navigate to the parent page from the nav bar. Is this an expected behavior? While with breadcrumbs the navigation was possible.

https://github.com/user-attachments/assets/2f3c7327-abec-47a1-961f-83db6537e4dd

Search keywords: nested

Janpot commented 3 weeks ago

This is intended behavior. It acts as a folder. That seemed to be the way it's usually used:

https://github.com/user-attachments/assets/3e7e0bdf-1cee-470c-a417-af5676e92c24

Perhaps we could think about adding a mode that makes it behave as both a folder and a page. But we should probably wait for user demand? Some questions with such a mode:

apedroferreira commented 3 weeks ago

This is intended behavior. It acts as a folder. That seemed to be the way it's usually used:

Screen.Recording.2024-08-16.at.11.29.24.mov Perhaps we could think about adding a mode that makes it behave as both a folder and a page. But we should probably wait for user demand? Some questions with such a mode:

  • How should it behave when clicked? How would you interpret user intent? Did they want to expand the folder? Or did they want to open the page? Guessing wrong would probably result in a not so great UX.

I might have had this "feature" enabled in a first implementation but there were some conflicts against the item acting just a folder so ended up removing it for now, so yes there will be some problems to figure out if we do this.