Skip to content

Idea: ability to browse into the app at its current state #26

Closed

Description

@daattali

This is something that wouldn't have been possible a month ago, but with shiny's new state features, I think this could is achievable.

When I have an error in my app, I want to dig deeper and see what's happening, and so far I've noticed I often use the take_screenshot() function as a debugging tool. But an even better option would be to be able to open up the app in its current state in a browser so I can see what is really going on.

This could be a bit weird to implement, especially because the state functionality of shiny currently requires you to declare ahead of time that you want to enable state, and it might interfere with the state saving functionality of a shiny app that already supports it. It's definitely prone to a lot of weirdnesses. But could be a nice idea to think about.

Activity

  1. gaborcsardi commented on Sep 16, 2016

    @gaborcsardi
    Collaborator

    Definitely sg to think about. I also think that the snapshot feature can be useful for the tests, I am just not sure how. An initial idea:

    • We inject the snapshot support into the app when starting it up in shinyapp$new(), every time.
    • Add an app$browse() method that
      1. does the snapshotting in phantom.
      2. opens the app from the snapshot in an actual browser.

    My only worry for this is that the snapshotting feature does not work for all apps. But there is not much we can do about that....

  2. daattali commented on Sep 16, 2016

    @daattali
    ContributorAuthor

    Yeah, that's exactly what I was thinking.

    I think the way the statesaving feature currently works is that the enablebookmarking function makes some global variable set, so before injecting, we could check if that variable is already set or not. There's going to be some issues to think about, but I'm glad you're onboard, browse is going to be a very powerful tool. And it's ok if it doesn't work for ALL apps because it's a convenience feature, it's not a testing function

  3. daattali commented on Aug 5, 2017

    @daattali
    ContributorAuthor

    Closing as I already opened a newer issue for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions