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

feat(admin-ui): Add location id and description to custom routes #2923

Conversation

rein1410
Copy link
Contributor

@rein1410 rein1410 commented Jun 26, 2024

Description

Add description and locationId to registerRouteComponent and registerReactRouteComponent so that users can define custom description and page tabs to their custom routes vis the registerPageTab API.

Breaking changes

Does this PR include any breaking changes we should be aware of?
no

Screenshots

image

Checklist

📌 Always:

  • I have set a clear title
  • My PR is small and contains a single feature
  • I have checked my own PR

👍 Most of the time:

  • I have added or updated test cases
  • I have updated the README if needed

Copy link

vercel bot commented Jun 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ❌ Failed (Inspect) Jul 10, 2024 7:35am

@rein1410 rein1410 changed the title Add location id and description to custom routes feat(admin-ui): Add location id and description to custom routes Jun 26, 2024
@@ -53,5 +64,14 @@ export class RouteComponent {
this.title$ = combineLatest([inject(ROUTE_COMPONENT_OPTIONS).title$, breadcrumbLabel$]).pipe(
map(([title, breadcrumbLabel]) => title ?? breadcrumbLabel),
);

this.locationId = this.route.snapshot.data.locationId;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a default locationId or can this be undefined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both locationId and description can be undefined

@Draykee
Copy link
Contributor

Draykee commented Jul 9, 2024

Are you updating the docs as well? :)
Here would be good I believe:

locationId is to define a custom locationId for the tabs configuration right?

Maybe add a hint here as well, since it's relevant for the tabs right?
https://github.com/rein1410/vendure/blob/fa194f31a1264cae285eca23d2ec6be91013e3d5/docs/docs/guides/extending-the-admin-ui/page-tabs/index.md

@michaelbromley michaelbromley merged commit 26b4ea5 into vendure-ecommerce:minor Jul 15, 2024
10 of 11 checks passed
@michaelbromley
Copy link
Member

@rein1410 thank you for this excellent & thorough PR, and thanks @Draykee for your input 👍

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

Successfully merging this pull request may close these issues.

3 participants