posit-dev / positron

Positron, a next-generation data science IDE
Other
2.56k stars 80 forks source link

Data Explorer: UI should have an offline mode when comm disconnected #2516

Closed petetronic closed 5 months ago

petetronic commented 7 months ago

When the comm backing a Data Explorer view closes, the Data Explorer is effectively offline and the UI should reflect that.

jmcphers commented 6 months ago

One fun thing that can happen is that the user can reopen the comm by assigning a rectangular value to a variable. We could account for this in the disconnect case (or track separately?).

via @DavisVaughan:

Feature request - RStudio has this behavior where if you update the binding to something it can't show but then reupdate the binding to a data frame again, then it picks up where it left off just fine.

That's a pretty nice behavior for interactive work, where its definitely possible you can temporarily mask that binding with something that isn't a data frame, but then you say "oops let me undo that" and the data viewer picks right back up.

library(nycflights13)
library(dplyr)

df <- flights

# cool!
df <- data.frame(x = 1:5)

# disconnect
df <- 3

# was hoping this would reupdate my existing window, like rstudio
df <- flights

(this may be a bad example because the rstudio viewer can indeed show 3, but try with like environment() or something and this still works)

wesm commented 6 months ago

I was thinking as a quick remedy, we could use a common button in the top bar to indicate the status of the UI: Idle/Computing/Disconnected. This will at least enable us to show some indication that the UI won't work anymore and we can improve it later.

wesm commented 6 months ago

I'll work on a straw man implementation of this together with #2742

jmcphers commented 5 months ago

We do have an offline indicator in the lower left, now, and that shows you the offline status, but the rest of the UI should also adjust.

For example, the UI will still offer to let you add filters and sorts:

image

And the result of many operations is blanking out the data set (e.g. here's the result of Clear Sorting)

image

I think that in disconnected mode we should disable or hide any UI that would require an RPC. (An open question: what should happen to the waffle itself, since we can't request any more data?)

juliasilge commented 5 months ago

When I was verifying #2278 I totally missed the offline indicator in the lower left until it was pointed out to me. IMO the UI treatment for an offline mode should be quite a bit less subtle than what we have right now.

wesm commented 5 months ago

I agree we need some kind of offline overlay, I moved this back to Up Next

jonvanausdeln commented 5 months ago

I see this was moved to Ready for Verification. Are we just going with the disconnected mode for now? Or was there another change to make it less subtle?

wesm commented 5 months ago

@jthomasmock your call here?

jthomasmock commented 5 months ago

This is what @softwarenerd proposed and I think we have consensus on:

IMG_7485

jthomasmock commented 5 months ago

The reasoning per Slack why we are aggressively closing is that without the comm, we can't really do anything.

jonvanausdeln commented 5 months ago

So should this be put to In Progress or Up Next ?

juliasilge commented 5 months ago

We are tracking a remaining problem in #3160