CRI-iAtlas / iatlas-app

R Shiny app for CRI iAtlas, an interactive web portal for exploring immuno-oncology data. (iAtlas portal 2022 and beyond)
Other
12 stars 3 forks source link

Show selected cohort/filters in modules #173

Open heimannch opened 2 years ago

heimannch commented 2 years ago

We mentioned this during some meetings, but I couldn't find it in any issues: it would be helpful to have a small summary of the selected cohort settings (dataset, group, filters) in each module.

Besides helping users keep track of what they are visualizing, another use case that would benefit from this: in issue #168, the screenshot is not enough for me to be sure I reproduced exactly what caused the error: I had to speculate that the ICI Cohort Selection includes a filter that excluded all samples from the dataset that, in the screenshot, was chosen to be used for training. I already made changes that prevent a dataset in this situation to be listed as an option, but still, it would have been handy to have the cohort settings.

andrewelamb commented 2 years ago

@heimannch I tried getting this to work once and placing it in the sidebar above the menu. The issue was that the instant a user made a change to the cohort in cohort selection the sidebar would have to update. When the sidebar updates to reverts back to the state the app starts in which is viewing the "iAtlas Explorer — Home" tab.

You can change this behavior somewhat by making cohort selection the starting tab, but then users would land on it when the app started. This also would not work now that we have multiple cohort selection modules.

This is something specific to shiny dashboards.

heimannch commented 2 years ago

Yeah, it doesn't sound like what we would want the app to do. What if we rendered this information in the module level, using the cohort_obj that is already sent when a module is open?

andrewelamb commented 2 years ago

I thought about it. The issue is that you would have to scroll up to see it which is only a little better then switching back to the cohort selector tab. Maybe there's something that would follow the user around no matter where in the module they were looking at?