akolgano / ft_transcendence

ft_transcendence 42 school
0 stars 0 forks source link

Dashboard game progression #36

Closed chinwenkai closed 4 days ago

chinwenkai commented 1 week ago

Added dummy data for game progression for each game. displays game progression of all games played by the user.

barbayjuliette commented 1 week ago

To have consistency, you could have a limited amount of games you show: like max 15-20 or 30 last games?

For the game specific data:

barbayjuliette commented 1 week ago
Screenshot 2024-10-09 at 18 05 21

Is there a way you can make this more compact? For example, show only 29/09 here, and then in the hover, you have the full date + time

barbayjuliette commented 1 week ago
Screenshot 2024-10-09 at 18 08 13

Later: change "opponent" to the opponent's username and the player to "you" Not sure if this is possible, but can you change the rectangle to a line? This would fit more with the type of graph. Also, for some graphs, it would be nice to have 1 line or 2 explaining what the graph is trying to show. Because some graphs are not very obvious what it is trying to show right away. Ex: This game shows the evolution of ... for the last X games you played"

barbayjuliette commented 1 week ago

To make the pie charts smaller, you have to use !important:

gameMarginChart {

width: 500px !important;
height: 500px !important;

}

barbayjuliette commented 1 week ago

Can you label each axis for each graph? (for game-specific graphs, show only the number, not "points")

barbayjuliette commented 1 week ago

@chinwenkai Add translation for the graph labels as well: ex: Game duration / victories / losses

chinwenkai commented 1 week ago

Current progress

To be continued

barbayjuliette commented 1 week ago
Screenshot 2024-10-12 at 14 27 12

I cannot see the axis titles. Some titles are h3, some titles are h4. --> Change all to same type

barbayjuliette commented 1 week ago

@chinwenkai In master, we now have the data for the games. You can see how I use it in profile. js. For the dashboards, you will need to pass the user.username to the API path.

For the game progression, we save it like this [0, 1, 1, 0, 1, 0, 1, 1]. 0 = user scores 1 = opponent scores Since the graph doesn't have the timestamps, that should be enough data.

So you can already change the game progression to the modal in /profile, since you should have all the data now. And delete it from the dashboards.

Also, it would be nice to have a graph about the tournaments. For the tournaments, the only thing we know for each is the ranking. So you could do a graph about the user ranking in the tournaments. Example: (for tournaments, it is not in the database yet) TOURNAMENTS: { "timestamp": "2015-06-15 23:30:01.000321+00:00", "results": ["guest1", "user", "guest3", "guest2"] }

barbayjuliette commented 6 days ago

When there is no data: I get this:

Screenshot 2024-10-16 at 14 39 15

--> If no data: do not show any graph, show a message that says that there is no game result

When there is one game result:

Screenshot 2024-10-16 at 14 40 50

Either show something, or display a message for this graph: that since there is only one game it cannot show the progression over time. It needs more data.

Screenshot 2024-10-16 at 14 48 23

--> Invalid date. remove end time. Start time is not really the start time, so if you wanna use it, it is better to call it game time or something like that

Screenshot 2024-10-16 at 14 44 18

I think it would make more sense if the games were shown chronologically for all graphs. Let me see with Anna if she can just send them in order, so you don't need to change anything

Modal in profile: Can you add a graph 📊 button, and when I click on it, the modal opens up. Because right now, it is bothering that you are just scrolling and it opens a modal without you choosing to open it.

Also add a description to the modal, because we don't know what the numbers on the y-axis and x-axis represent

barbayjuliette commented 6 days ago
Screenshot 2024-10-16 at 15 08 14

The dates and time are not correct. Wrong timezone. It should be the same as in profile