-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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): improve facet selector with the code #3175
feat(admin-ui): improve facet selector with the code #3175
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvement! I've left a couple of comments I'd like you to look at.
@@ -13,4 +13,9 @@ export class FacetValueChipComponent { | |||
@Input() removable = true; | |||
@Input() displayFacetName = true; | |||
@Output() remove = new EventEmitter<void>(); | |||
|
|||
get formattedTitle(): string { | |||
const facetCode = this.facetValue.facet.code ? `(${this.facetValue.facet.code}) ` : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the need for this line? Do you expect that the facet.code
may sometimes be falsy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect the code to be empty (I've updated the code to reflect this) if it's not requested in the graphql request
b499e03 (example: the product page)
...s/admin-ui/src/lib/core/src/shared/components/facet-value-chip/facet-value-chip.component.ts
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
35892a5
into
vendure-ecommerce:minor
Thank you! |
Description
Sometimes multiple facets have the same name so it's impossible to distinguish them except with code name
This PR introduces the code name in the facet value chip component
PS: I have not found the way to generate the graphql schema for the admin-ui directory
Breaking changes
No
Test
Add a facet with the same name (but different code) as another one and with the same facetValues
Go to http://localhost:4200/admin/catalog/collections/2
Add the facet in the collection filters
Screenshots
Add a popover to include more context about the facet type
Update the title displayed on hover to include more context about the facet type
Checklist
📌 Always:
👍 Most of the time: