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(products): display popup with product categories #369

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented Feb 21, 2024

What

Following #367

When the user clicks on the new "product categories count chip", a popup opens with the list of the categories.

Screenshot

Product without categories Product with categories
image image


<v-card-text v-if="categories.length">
<v-chip v-for="category in categories" :key="category" label class="mr-2 mb-2">
{{ category }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would use category.name here so that non-english speaker can use the information.

And eventually in the future have a small symbol next to untranslated names with a tooltip saying that category is not translated with a link to taxonomies.
Also a link to add categories for this product.

Copy link
Member Author

Choose a reason for hiding this comment

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

the categories object looks like this : ["en:breakfasts", "en:spreads"] . so the category is only a string

Copy link
Member Author

Choose a reason for hiding this comment

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

and I haven't plugged in the translation yet, would need to have the full list of categories, it can wait a future PR / some help from other contributors :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Alright!

</v-chip>
</v-card-text>
<v-card-text v-if="!categories.length">
<span class="text-red">{{ $t('ProductCategories.Empty') }}</span>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Link to the OFF product page maybe?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah we should ! will add in another PR (currently the ProductCategoriesDialog component doesn't have any info about the product, need to change it)

@@ -182,6 +182,10 @@
"ProductQuantityLitre": "{0} L",
"UnknownProduct": "Unknown product name"
},
"ProductCategories": {
"Title": "Categories",
"Empty": "This product does not have any categories yet."
Copy link
Collaborator

@dq18 dq18 Feb 22, 2024

Choose a reason for hiding this comment

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

Maybe:
"No categories have been added for this product yet." Or with extra "Help us @ OFF page"

Base automatically changed from raphodn/product-category-label-count to master February 23, 2024 15:37
@raphodn raphodn force-pushed the raphodn/product-category-dialog branch from 6700709 to 1dfb20f Compare February 23, 2024 15:38
@raphodn raphodn merged commit 69aa514 into master Feb 23, 2024
2 checks passed
@raphodn raphodn deleted the raphodn/product-category-dialog branch February 23, 2024 17:13
@raphodn raphodn linked an issue Mar 7, 2024 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Page per category
2 participants