kart7990 / virtualpitwall

https://staging.virtualpitwall.com
Other
15 stars 7 forks source link

Standing Update and Selected Car #24

Closed elft3r closed 5 months ago

elft3r commented 5 months ago

Hey @kart7990, I now finally had the time to look into the standings table. I did some more testing and made changes to the material-react-table version as I wasn't able to fix the problems you also had with the refresh while having a selected row.

This PR adds the following changes:

I already have some improvements in my mind like

Let me know, if I missed something or you have additional suggestions on more info to display.

Best, Jochen

kart7990 commented 5 months ago

Great work, Jochen! Just one comment on the changes, which is also related to the failing build I believe.

Have collapsible rows when it's a teams session (and show the drivers as sub rows)

I might need a rough poc or sketch to help me visualize this. Maybe if MRT supports multiselect for rows (like ctrl+click, shift+click) we could highlight all the selected cars. Thinking if a team has multiple cars in a race, or in a championship battle with other specific drivers, things like that. 🤔

Add car brands to the table

Love it

Change the background color for the different car classes

Agree, I had this in legacy. Some of the code might already be here and commented out. Speaking of, the interpolation really needs some work on the track map. I don't like how it isn't very smooth, but it's kind of low on the priority list at the moment 😅 .

Add average lap times over the last 5 / 10 laps

I think that would be cool. Maybe not in standings table, though. Maybe in another "timing analysis" card where a user could run all kinds of advanced timing analysis on specific cars and add it to a list of tracked cars with the calculations they want or something. 🤔

elft3r commented 5 months ago

Add average lap times over the last 5 / 10 laps

I think that would be cool. Maybe not in standings table, though. Maybe in another "timing analysis" card where a user could run all kinds of advanced timing analysis on specific cars and add it to a list of tracked cars with the calculations they want or something. 🤔

I like the idea of having a timing analysis component for more detailed insights. However, I also like to have it in the standings. I'm already using this in my overlay regularly, as it gives me a nice view of how I'm compared to the others (especially, as in Racelap it's also green if you are faster / red if you are slower).

Have collapsible rows when it's a teams session (and show the drivers as sub rows)

I might need a rough poc or sketch to help me visualize this. Maybe if MRT supports multiselect for rows (like ctrl+click, shift+click) we could highlight all the selected cars. Thinking if a team has multiple cars in a race, or in a championship battle with other specific drivers, things like that. 🤔

Yes, makes sense. I will try to come up with something.

I also like the idea, of having the team cars highlighted. It's possible to do this with MRT by selecting, as it allows multi-select and things like this. Maybe we can also get the Teams of which a driver is a member, via the data API and then correlate that information directly, without the user doing anything 🤔

Man, so many good ideas, and so little time to work on them 🤣

kart7990 commented 5 months ago

I like the idea of having a timing analysis component for more detailed insights. However, I also like to have it in the standings. I'm already using this in my overlay regularly, as it gives me a nice view of how I'm compared to the others (especially, as in Racelap it's also green if you are faster / red if you are slower).

@elft3r Sounds good! As long as we do it in a performant way. Calculating that on each live timing update might be a bit much. I bet we could calculate it on every completed lap update, which is much less often, and store it in a map of <Car#, Averages>(not sure of JS/TS and Map types, but you get the idea). Then have a simple lookup from the standings table based on car number.