Giter VIP home page Giter VIP logo

reviews-and-ratings's Introduction

📢 Use this project, contribute to it or open issues to help evolve it using Store Discussion.

All Contributors

Reviews and Ratings

Reviews & Ratings allows customers to submit reviews and ratings for products and see them while navigating the store.

reviews-and-ratings-app

Configuration

Step 1 - Installing the Reviews and Ratings app

Using your terminal, log in to the desired VTEX account and run the following command:

vtex install [email protected]

Step 2 - Defining the app settings

  1. Access the Admin, go to Apps > My Apps and then click the Reviews and Ratings card:

apps-reviews-and-ratings

  1. On the app settings page, define the following settings based on the desired scenario:

reviews-settings

  • Allow Anonymous Reviews - If unchecked, only logged-in customers will be able to review products.

  • Require Admin Approval - Checking this box activates the review moderation system. Newly submitted reviews will not be displayed on the store until an admin approves them in the Admin account. For more information, see the App behavior section below.

  • Ask For Reviewer Location - Checking this box activates an optional review field. Customers that submit reviews will be asked to enter their current location (e.g., "Boston, MA").

  • Default all review accordions to open - The app displays reviews on the product page inside collapsible accordions. Checking this box will cause all review accordions to default to open when the page is loaded, with review text limited to three lines. Reviews with more than three lines of text will be truncated with an ellipsis and a Show more link that can be used to display the whole review text.

  • Number of open review accordions - Checking this box allows you to set a specific number of review accordions (instead of all of them) to automatically open when the page is loaded, displaying all the review text. If the Default all review accordions to open setting is active, this option is ignored.

  • Display graph - Checking this box allows you to display the reviews graph on the product details page.

  • Display stars in product-rating-summary if there are no reviews - Checking this box allows you to display empty stars even if the product has no reviews yet.

  • Display total reviews number on product-rating-summary block - Checking this box allows you to display the total number of reviews for a product.

  • Display Add review button on product-rating-summary block - Checking this box allows you to display an Add review button under the stars.

  • Display stars in product-rating-summary if there are no reviews - Checking this box allows you to display empty stars even if the product has no reviews yet.

  • Display total reviews number on product-rating-summary block - Checking this box allows you to display the total number of reviews for a product.

  • Display Add review button on product-rating-summary block - Checking this box allows you to display an Add review button under the stars.

Step 3 - Declaring the app blocks in your store theme

Once the app is configured, it is time to place the following blocks in your Store Theme app:

  • product-reviews - This block can be added to the product page template (store.product). It renders a paginated list of reviews for the product being viewed and a form for the customer to add a new review.

  • product-rating-summary - This block can be added to the product page template (store.product) and renders the average rating for the product being viewed as well as the number of reviews that have been submitted. Only approved reviews will count toward these figures if the account uses moderation.

  • product-rating-inline: Similar to the previous block (product-rating-summary), but intended to be used in product shelves. This block only displays the product average rating.

App behavior

As described above, the app may be configured to use a review moderation interface where an admin is responsible for approving the reviews before they are displayed on the store.

To access and use the review moderation admin interface, follow the instructions below:

  1. Enable the Require Admin Approval setting as described above.
  2. Open the Admin and navigate to Catalog > Reviews.
  3. You may view either Pending or Approved reviews using the tabs at the top of the page.

You can export reviews to XLS files from the Download tab. The export is limited to 800 reviews at a time. Please use the date pickers to choose the time range of reviews you want to export.

⚠️ If you have updated to version 3.x after using a prior version of Reviews and Ratings, you may see the Migrate Data button instead of a list of reviews in the Catalog > Reviews page. Clicking this button will migrate all existing review data from the previous storage solution (VBASE) to the new solution (Masterdata V2). Once the migration is finished, the page will automatically refresh, and the list of reviews will become available.

Individual pending reviews may be approved or deleted using the kebab menu (3 dots button) in the right column or by selecting the checkbox on the left. Multiple reviews can also be selected using the checkboxes to approve or delete in bulk.

Approved reviews may be deleted as well, either individually or in bulk.

Customization

To apply CSS customizations in this and other blocks, follow the instructions given in the recipe on Using CSS handles for store customization.

CSS handles
container
formContainer
formSection
formBottomLine
formRating
formName
formLocation
formEmail
formReview
formSubmit
formInvalidMessage
graphBar
graphBarContainer
graphBarPercent
graphContent
graphContainer
graphText
graphTextLabel
loginLink
reviewComment
reviewMessage
reviewCommentRating
reviewCommentsContainer
reviewCommentUser
reviewsHeading
reviewsRating
reviewsRatingAverage
reviewsRatingCount
reviewsOrderBy
reviewsPaging
reviewInfo
reviewVerifiedPurchase
reviewDate
reviewDateSubmitted
reviewDateValue
reviewAuthor
reviewAuthorBy
reviewAuthorName
star--empty
star--filled
star
starpicker
stars
starsContainer
summaryContainer
summaryButtonContainer
writeReviewContainer
graphContent
graphContainer
graphText
graphTextLabel
graphBarContainer
graphBar
graphBarPercent
summaryButtonContainer
summaryTotalReviews
writeReviewContainer
writeReviewButton

Rest APIs

To see how to use the list of REST APIs, read Reviews and Ratings API overview.

GraphQL IDE

To see how to use the graphQL queries and mutations, follow these steps:

  1. Open the Admin GraphQL IDE app.
  2. Select thevtex.reviews-and-ratings app.
  3. Click docs in the top right corner. reviews-and-ratings-app

You will see the list of all available queries and mutations, including schemas and variable descriptions.

Contributors ✨

Thanks goes to these wonderful people:


khrizzcristian

💻

Julio Moreira

💻

Brian Talma

💻

Arturo Castillo

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

reviews-and-ratings's People

Contributors

allcontributors[bot] avatar arturo777 avatar aurorahey avatar btalma avatar camilavcoutinho avatar claudiu-iviteb avatar coltran3 avatar cristiancustomsoft avatar filafb avatar guerreirobeatriz avatar juliomoreira avatar jumc avatar kaio-donadelli avatar kaisermann avatar khrizzcristian avatar klynger avatar klzns avatar mvandeusen avatar pedrohenriqueoliveira avatar pedroluccasantiago avatar polishq avatar shashidhar85 avatar sheilagomes avatar sumanbitcot avatar sumanraj123 avatar syed-vtex avatar thiagoarmede avatar thyarles avatar tsheng1 avatar wender avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reviews-and-ratings's Issues

v2.12.5 Issues

Describe the bug
There are several problems in this version. The latest stable version is 2.12.3.

  1. Translations do not work in the admin area.
    reviews_translations

  2. Reviews don't always work. After I send a review for a product, I receive a message that it has been added, later on the product page it writes to me that I have already left a review for that product, but the review is not visible on the product page or in the admin section
    reviews_issue

I need to change the the wording in the app.

What are you trying to accomplish? Please describe.
I need to change the wording in the app on the client side. My client wants different text than the one displays

What have you tried so far?
I changed it using CSS, but this apps classes are not specific and its a PITA

Additional info
Can I just fork it and change the messages?

Account Workspace
timberlandmx ktbl

ASP.NET Core usage style

In our enterprise we are currently evaluating VTEX.

Having a look at the source code of this extension, I noticed you handle manually various stuffs for a specific endpoint (see https://github.com/vtex-apps/reviews-and-ratings/blob/master/dotnet/Controllers/RoutesController.cs).

Is there a technical need to handle the various cases manually, instead of taking advantage of the facilities offered by the framework (i.e. using annotations)?
I think for example to the query strings, or the payload of a POST request.
You can expose the same endpoint, with different action methods and HTTP actions of course.

Thanks! 😄

Inaccuracy in cpu request

Describe the bug
The value added to your service.json as cpu request is inaccurate by a factor of 10: if you want to request 250m of CPU, you should put 25 into the value field of your service.json. More information on that here.

I would open a PR, but apparently I don't have permission for that.

Translation bug

I try to translate this section
image ,but I can't. It's about the loading reviews message when the product page is loading. The component is product-summary-rating. In messages folder I have only those possibilities: "store/reviews.list.summary.loading": "Loading summary…", and "store/reviews.list.loading": "Loading reviews…". I have tried to translate in romanian both... but no succes.

How I tried:

{
"args": {
"to": "ro-RO",
"messages": [
{
"srcLang": "en-DV",
"srcMessage": "store/reviews.list.summary.loading",
"targetMessage": "Incarca recenzii",
"context": "[email protected]"
}
]
}
}

It is possible to add this component as a filter?

What are you trying to accomplish? Please describe.
I am trying to place this component as a filter to be able to make a filter according to the ratings

What have you tried so far?
Look for settings to put it as a filter and I found nothing, I am evaluating the possibility of generating an extension of the filters component to add this

Account Workspace
easyclqa chef

Misspelling on pt.json

Describe the bug
"store/reviews.list.summary.totalReviews" has the word "avalição" in place of "avaliação"

To Reproduce

  1. Own a product with just one review
  2. Go to product page
  3. See error

Expected behavior
Show "1 avaliação"

Screenshots
image

Import/Export Feature

Is your feature request related to a problem? Please describe.
I need a way to import existing reviews when migrating stores from other platforms.

Describe the solution you'd like
A nice import feature in the admin app is desirable.

Describe alternatives you've considered
Don't know an easy way to import external reviews, found a way by developing an external app and use graphql, but a native solution will be the best.
Additional context
If Export is to much, just Import feature will be ok.

Missing CSS Handlers

Describe the bug
Missing CSS Handlers on section title (<h3 class="review__title t-heading-3 bb b--muted-5 mb5">).

To Reproduce

  1. Include vtex.reviews-and-rating in manifest.json
  2. Inspect reviews-and-rating component and see it's section title

Expected behavior
A clas like "vtex-reviews-and-ratings-1-x-review__title"

This issue is also available for review__comments

Screenshots
image

Private queries

What are you trying to accomplish? Please describe.
I'm trying to understand why most (if not all) queries from this app are annotated with @cacheControl(scope: PRIVATE).

My understanding is that fetched reviews shouldn't vary by user and therefore they can be cached.
When we use PRIVATE as the scope we make all queries to be executed as POST requests, which make them bypass all platform caches.

Since there is no cache, reviews and ratings account for 15~20% of our ingress requests. To make matters worse, the app has a leak which makes it overuse resources and become unstable. And when the app fails, our border error rate increases, which:

  • Triggers false alarms that overload platform on-call engineer.
  • Opens our ingress circuit breaker, making the cluster as a whole unstable.

I understand that it may not be trivial to debug the leak, but if caching responses is an option it may reduce the app load to the point where the leak is not relevant and instabilities do not hamper the whole platform.

Additional info

Anonymous review is not working

Describe the bug
In the latest version of the app, if anonymous review is allowed, when the review is submitted, the server returns an error with code 500.

To Reproduce
Steps to reproduce the behavior:

Install the latest version (2.10.1) activate the possibility to leave a review anonymously.

Expected behavior
The review should be submitted, replacing the form with the confimation message.

Screenshots

image

Additional context
Tryied this on two different accounts.
Works fine if you log in, or if you install version 2.10.0

Create class for styling

Is your feature request related to a problem? Please describe.
The review app has some classes, but without the possibility of being used for styling.

image

Describe the solution you'd like
Enable these classes to be styled.

Modularizar o app

Bom dia pessoal, bora falar em PT-BR mesmo. Então, seria interessante modularizar o app para que possamos dar uma diferenciada no layout, além de deixar mais Limpo.

Uma dica seria:

- Rating
- Comments
- Write Comment
- Quantity of comments
- Grade average

Looping request

Navigation menu entry duplicated

Describe the bug
In the admin menu, the entry reviews is being created twice.
To Reproduce
Navigate to admin panel and take a look on the sidebar menu.

Screenshots
image

Missing css handlers

Describe the bug
Hi! We need some css handlers to customize the login link in the reviews app. I've attached a printscreen to better understand the issue.

To Reproduce
Steps to reproduce the behavior:

  1. Install reviews-and-ratings app
  2. Try to customize the links color for the tag inside .writeReviewContainer

Screenshots
image

Splunk over usage

Describe the bug
According to this query, this app is responsible for almost 20% of the volume of ingested data on io_vtex_logs index of Splunk.

Most logs of that app seem to be disposable. I've found a couple of offenders:

  • Ones that start with [OK] and seem to have no relevant semantic information.
  • [NotFound] logs.

To Reproduce
Open this Splunk query.

Expected behavior
Only use Splunk for data that is critical to debug production.

Comportamiento de ordenamiento por fecha

Describe the bug
El ordenamiento por fecha no funciona correctamente. Solo ordena de mayor a menor o lo opuesto segun ascendiente y descendiente el numero del mes.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Admin/Catalog/Reviews'
  2. Click on 'Date'
  3. See an error
    image

Expected behavior
Un comportamiento logico que seria que ordenara la fecha completa: mes, dia, año y hora.

CPU over usage

Describe the bug

Some of the pods of this app use way more CPU than others.
This may be caused by a resource leak and causes increase in latency and timeouts of the requests that hit the specific pod.

Screen Shot 2021-09-01 at 11 53 05

For instance, we have a single pod with average usage of 1.2 CPU cores, while another couple of pods are using around 0.5 pods.

To Reproduce
Steps to reproduce the behavior:
Just look at IO Deployments Grafana dashboard a few hours after a deploy has happened.

Expected behavior
Pods should have similar CPU usage so HPA can work properly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.