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

Panel::getUrl is unnecessarily dependant on navigation items #14069

Open
mokhosh opened this issue Aug 27, 2024 · 3 comments
Open

Panel::getUrl is unnecessarily dependant on navigation items #14069

mokhosh opened this issue Aug 27, 2024 · 3 comments
Labels

Comments

@mokhosh
Copy link
Contributor

mokhosh commented Aug 27, 2024

Package

filament/filament

Package Version

v3.2.108

Laravel Version

v11.20.0

Livewire Version

No response

PHP Version

8.3.9

Problem description

Imagine if you are required to have a "Home" link before your "Dashboard" link in the navigation menu to get the user to the homepage of the website.
When you try to get the URL for a panel you want the dashboard url regardless of the appearance of the navigation menu.
But the current implementation gives you the first navigation item as the panel url, which is counter intuitive and I wouldn't have guessed it if I hadn't done some source diving.

Expected behavior

Panel::getUrl() should always return url('panel-id') or an explicitly customised url.

Steps to reproduce

Add a navigation item above "Dashboard" and try to get the url of the panel.

Reproduction repository (issue will be closed if this is not valid)

https://github.com/mokhosh/filament-dashboard-url-bug

Relevant log output

No response

Donate 💰 to fund this issue

  • You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
  • 100% of the funding will be distributed between the Filament core team to run all aspects of the project.
  • Thank you in advance for helping us make maintenance sustainable!
Fund with Polar
@mokhosh mokhosh added bug Something isn't working medium priority unconfirmed labels Aug 27, 2024
@mokhosh
Copy link
Contributor Author

mokhosh commented Aug 27, 2024

Could be related #13928

@MahouShoujoMivutilde

This comment was marked as resolved.

@tonypartridge
Copy link
Contributor

See my Issue here too #13290

Similar thing about needing a home url function which doesn't just pick the first in an array.

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

No branches or pull requests

4 participants
@tonypartridge @mokhosh @MahouShoujoMivutilde and others