-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Conversation
|
||
<v-card-text v-if="categories.length"> | ||
<v-chip v-for="category in categories" :key="category" label class="mr-2 mb-2"> | ||
{{ category }} |
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 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.
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.
the categories
object looks like this : ["en:breakfasts", "en:spreads"]
. so the category
is only a string
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.
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 :)
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.
Alright!
</v-chip> | ||
</v-card-text> | ||
<v-card-text v-if="!categories.length"> | ||
<span class="text-red">{{ $t('ProductCategories.Empty') }}</span> |
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.
Link to the OFF product page maybe?
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.
yeah we should ! will add in another PR (currently the ProductCategoriesDialog
component doesn't have any info about the product, need to change it)
src/i18n/locales/en.json
Outdated
@@ -182,6 +182,10 @@ | |||
"ProductQuantityLitre": "{0} L", | |||
"UnknownProduct": "Unknown product name" | |||
}, | |||
"ProductCategories": { | |||
"Title": "Categories", | |||
"Empty": "This product does not have any categories yet." |
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.
Maybe:
"No categories have been added for this product yet." Or with extra "Help us @ OFF page"
6700709
to
1dfb20f
Compare
What
Following #367
When the user clicks on the new "product categories count chip", a popup opens with the list of the categories.
Screenshot