Annotation toggles for treatments should be disabled (grey out) if no such treatment is in the data set. However, streamlit's session_state does not include a reference to the actual object but just boolean indicating the state of the toggle.
Find a way to disable UI elements dynamically. Current workaround is to check if the treatment indicator is empty in the respective plot utility. This is bad since it does not communicate to the user what's going on and can thus easily be misjudged as "the app is not working correctly!".
Annotation toggles for treatments should be disabled (grey out) if no such treatment is in the data set. However, streamlit's
session_statedoes not include a reference to the actual object but just boolean indicating the state of the toggle.Find a way to disable UI elements dynamically. Current workaround is to check if the treatment indicator is empty in the respective plot utility. This is bad since it does not communicate to the user what's going on and can thus easily be misjudged as "the app is not working correctly!".