-
Notifications
You must be signed in to change notification settings - Fork 1
usage metrics dashboard: better refresh button #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
From a visual perspective / having things that folks should need to interact with at the top I think we should keep this lower down rather than at the top. I know before it was low enough that folks had to scroll to get to it, but maybe we can get rid of the hline there instead or some other way to use that space more efficiently without promoting cache refreshing to the first thing someone sees. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. A few changes
output$last_updated <- renderText({ | ||
fmt <- "%Y-%m-%d %l:%M:%S %p" | ||
paste0("Last updated ", format(usage_last_updated(), fmt)) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps "x seconds/minutes ago" would be better? It uses the server's local time, which… like connect.posit.it currently shows 11:35 PM, and it's 7:35 PM here in NYC.
Perhaps, but unless it's easy to implement, let's not get stuck on getting this perfect. There are a variety of ways one could go about making this be localized (like https://stackoverflow.com/questions/45651789/changing-time-and-dateformat-to-show-correct-format-on-shiny-dashboard). If we can do that quick + easy let's do it. Could you timebox adding one of these and then do the simple thing below if you can't within that timebox?
But it also would be fine to add %z
so that the offset is shown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just following your suggestion to show the time zone — anything else seems to get really fiddly (capture the browser's time zone and send it to the server).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the checksums need to be updated in the manifest right?
I moved it to the top for a few reasons, but yeah, to have it visible above the fold:
Additionally, I considered moving it to the title bar — that way it feels a little more like a meta app-level interaction and less like one of the core controls. What do you think about that? |
@jonkeane I moved the button back down to the bottom, and removed the separators. I did think the separators enhanced clarity (between global filters and filters that apply to the outer / inner views only) but I don't think the regression is that significant, and it brings the "Refresh Data" control above the fold on my laptop's external display, in a non-fullscreen window, with the Connect UI showing, so that's a win in my book. |
Frankly, both of these make it seem like maybe we should not have a cache at all. What's performance like without any cache at all? Is it possible for that to be delightful (the answer might still be no)? Are there things we need to improve in the Connect API that would make this delightful without needing to cache + communicate how that works to users?
|
@jonkeane You make a good argument for removing caching totally! I would be in favor of that, I think. The feeling of slowness comes from a few things:
Notably both are more significant problems for Admin users:
As currently implemented, caching mainly speeds up interactions for users who are setting the date range back to a date range they have selected before, after selecting a different date range. From this perspective, yeah, I can totally see how having the caching, which necessitates a "Refresh Data" button, would be worse. Another middle ground option is: keep the cache behavior but change it to a "session" cache, i.e. the browser's refresh button will clear the cache for a user. This means that in an individual session with the app, navigating around might be faster, but we wouldn't need the "Refresh Data" button, because the cache would be dropped when a new Shiny session begins, which happens upon browser refresh. I think this is probably the best quick win for caching-related stuff, and is really simple to implement. |
This PR makes two small changes:
It also increments the version, so will cause a release.
Questions: