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

How to customize a tab name in a URL? #127

Closed
martio opened this issue Nov 29, 2020 · 6 comments
Closed

How to customize a tab name in a URL? #127

martio opened this issue Nov 29, 2020 · 6 comments
Labels
request New feature or request

Comments

@martio
Copy link

martio commented Nov 29, 2020

How to customize a tab name in a URL?

Instead of: "http://localhost/admin/resources/users/1?tab=Aktywno%C5%9Bci" there must be: "http://localhost/admin/resources/users/1?tab=activities"

HasMany::make(__('nova.resources.tabs.user.panels.activities'), 'activities', Activity::class),
@martio martio changed the title How to customize a bookmark name in a URL? How to customize a tab name in a URL? Nov 29, 2020
@RVxLab
Copy link
Collaborator

RVxLab commented Nov 30, 2020

Currently this is not possible. It's dictated by the tab name.

This is a good idea to have though. If you want to create a PR for this feel free to do so. Otherwise I'll take a look next week.

@RVxLab RVxLab added the request New feature or request label Nov 30, 2020
@keironwaites
Copy link

Came here to vote for this. Please see the attached photo for a real world use-case. I include a record count in my tab name which will change over time and cause the tab deep linking to become unreliable.

Screenshot 2020-12-03 at 13 59 53

@RVxLab
Copy link
Collaborator

RVxLab commented Dec 3, 2020

I definitely agree that this is a very good improvement. As I'm gonna be busy this weekend, I will take a look next week. However, for backwards compatibility reasons this would not be enabled by default.

This is how I would likely implement this:

  • Add a slug method to the Tab which accepts a nullable string.
  • The $slug property would default to the sluggified name.
  • Then it'll be passed to the Vue component which will pass it to the router.

I'd like to hear what you think.

@keironwaites
Copy link

Sound plan.

@RVxLab
Copy link
Collaborator

RVxLab commented Dec 13, 2020

Alright so I had a look. In the current state of the package this isn't possible. However with the ideas mentioned in #129 this would be made possible. I'm going to need to write this one out and plan this correctly as this would be a MASSIVE change.

I'll keep this issue open for the time being and refer to it when I'm ready to post an issue to address #129.

@RVxLab RVxLab mentioned this issue Jan 30, 2021
@RVxLab
Copy link
Collaborator

RVxLab commented Jan 30, 2021

This has been implemented with the new Tab object and is available in master. I'm not ready to tag this yet as I'm still wanting to do some updates and fixes. Until 1.4.0 you can use dev-master.

@RVxLab RVxLab closed this as completed Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants