Gold872 / elastic-dashboard

A simple and modern dashboard for FRC
MIT License
71 stars 13 forks source link

Add the option to switch tabs based on some condition #22

Closed katzuv closed 9 months ago

katzuv commented 9 months ago

One way to implement that is to have a constant entry that holds the name of the tab which should be active/in focus. A few use cases I thought of:

Gold872 commented 9 months ago

This can be done via robot code by using the select tab method of the Shuffleboard API. Whenever you use that method in your robot code, Elastic will switch to the tab you want to select if the tab exists

Here's the WPILib documentation for this part of the Shuffleboard API: https://docs.wpilib.org/en/stable/docs/software/dashboards/shuffleboard/layouts-with-code/using-tabs.html

katzuv commented 9 months ago

Didn't know that existed, thank you!