avgupta456 / statbotics

📈 Modernizing Data Analytics for FRC Robotics
https://statbotics.io/
MIT License
64 stars 9 forks source link

Add FRC Colors integration to v2 bubble chart #364

Open jonahsnider opened 4 months ago

jonahsnider commented 4 months ago

Congrats on the v2 release!

This PR adds the FRC Colors integration to the v2 bubble chart component. By default, colors are set to disabled, and can be enabled with a switch. Colors are hidden if their contrast ratio with the background is too low. This accounts for light/dark themes. There is no longer a limit on how many teams can be queried at once.

lDark mode screenshot Light mode screenshot

vercel[bot] commented 4 months ago

Someone is attempting to deploy a commit to a Personal Account owned by @avgupta456 on Vercel.

@avgupta456 first needs to authorize it.

avgupta456 commented 4 months ago

Thanks for the PR! The Statbotics API that the new frontend subscribes to actually has a primary_color and secondary_color fields from FRC Colors to reduce website network requests (also reduces queries to TBA, Chezy Arena, etc.)

I need to do some more work to expose the primary and secondary colors in the website through the data context. I'll put this PR on hold until I do that (and probably the team, event, and match pages). For what it's worth, I think most people will use the V1 website until these features are complete anyways.

jonahsnider commented 4 months ago

Ah, got it, thanks for the info. Feel free to adapt any parts of the PR you think would be useful once the colors are exposed from the Statbotics end.