blockful-io / trustful-gap-deployments

MIT License
0 stars 2 forks source link

feat: create reviews summary for a better ux #3

Closed FrancoAguzzi closed 4 weeks ago

FrancoAguzzi commented 1 month ago

Feature Request

With a number of reviews comes a number of possibilities...

Definition of Done

How to do so?

  1. Number of reviews Simply gather the length of the reviews array of the visited grant program.

  2. Average interval Gather the timestamp of the first review of a grant program and gather the timestamp of the "now" moment. With T1 and T2 (timestamp 1 and 2), do T1 - T2 to get to know the interval time between these times. Divide this interval by the number of reviews the grant program has. This result, this timestamp, represents the interval of time that it is taking for the grant program to receive a review. Lastly, transform the timestamp to a readable information: use "per day", "per week", "per month", "per year" labels if the interval is less than a 1 year.

Example:

3 days interval messages: "Typically reviewed 2 times per week" 1 day interval messages: "Typically reviewed 1 time per day" 7 days interval messages: "Typically reviewed 1 time per week" 21 days interval messages: "Typically reviewed 1 time per month" 18 days interval messages: "Typically reviewed 1 time per month" 32 days interval messages: "Typically reviewed 11 times per year" 365 days interval messages: "Typically reviewed 1 time per year" 366 days interval messages: "Typically reviewed each 366 days"

  1. Average review Sum all the reviews scores and divide this number by the number of reviews summed.

  2. Reviews per score Math.round() each review and set each one into a bucket between the 5 possible ones (1 star, 2 stars, 3 stars, 4 stars or 5 stars)... After this, divide each bucket length by the total number of reviews to gather the percentage each bucket has of all the reviews.

Design specifications

Can be found in this Figma artboard

You should look for this section:

Image