Roestlab / massdash

MassDash: A web-based dashboard for streamlined DIA-MS visualization, analysis, prototyping, and optimization
https://massdash.streamlit.app/
BSD 3-Clause "New" or "Revised" License
16 stars 3 forks source link

Patch/home button #93

Closed singjc closed 5 months ago

singjc commented 5 months ago

As discussed with @jcharkow during out OpenSwath dicussion, we thought it would be nice to make the massdash logo clickable to reset the app back to the home landing page without having to click the refresh browser button.

Unfortunately, streamlit doesn't have clickable images in their built in library. However, there are separate streamlit-component libraries (i.e. st-clickable-images) that support this, but this would add an additional dependency.

I wanted to avoid additional streamlit component libraries, so instead I added 3 buttons below the logo: 1 - home logo to reset to the home landing page, 2 - docs logo to open a separate the read the docs page, and 3 - github logo to open a separate github home page.

Note: I unfortunately cannot add the actual github logo in the button, streamlit doesn't allow for custom icons to fill the button.

I also added a constants.py file to move all constant variables into.

image