Show desktop notification on rerun if tab is inactive.
See original GitHub issueProblem
- User calls
streamlit run foo.py
- A browser tab shows up with the
foo.py
app in it - User
ctrl-c
’s out of the server, but leaves the tab open. - User changes tab, works on something else for hours.
- User wants to go back to working on
foo.py
. So she callsstreamlit run foo.py
…and then nothing happens. No new browser tab opens, because the tab from (1) is already connected to the new Streamlit server. And the existing tab doesn’t come to the top. So the user has no idea where the app loaded.
Solution
Show a notification at step (4), saying:
App
yourscript.py
is ready. Click here to see it.
On click, the browser with the Streamlit tab comes to the front and the tab becomes active.
Config
This behavior should be configurable with:
[browser]
showNotificationIfTabInactive = false
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Show Chrome desktop notifications only when tab is inactive
Save this question. Show activity on this post. I'm currently using the following code to show Desktop notifications in Google Chrome:
Read more >Display web notifications only when the browser window/tab is ...
The most important feature is that the notification will be displayed regardless of which tab or window is focused.
Read more >Turn off Automatic Updates to Boost Performance - Tableau
It's possible to enter an invalid state when automatic updates are turned off. When this happens, the view is desaturated and invalid commands...
Read more >Foreground and background processing—Help
When background processing is disabled, tools execute in the foreground, and you must wait for the process to finish before you can use...
Read more >Use notifications to get alerts - Computer - Google Chrome Help
Select View site information Lock . Next to Notifications, select Allow from the drop down menu. ... If you receive notifications from a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@brendalf: We really appreciate your interest in contributing to Streamlit.
Notifications in Streamlit are part of our longer term roadmap so I see this work fitting as a feature in that project. However, this is not a highly requested feature and the broader Notifications project is further down in the list of our priorities.
I think that this project involves a decent amount of Product and design cycles, and we don’t have the bandwidth to support this work as of today. I’ll close this issue for now and re-open when we decide to work on Notifications. Thanks!
@tvst : FYI, I’ve added this feature and the description to the overall Notifications project.
Hey @brendalf, I don’t think anyone is currently working on this, but it also seems that we’re not entirely sure whether we want to do this. I can surface this to our product team to see if we can get a decision as to whether or not this is something we’d like to add.