- 
                Notifications
    You must be signed in to change notification settings 
- Fork 115
          feat: Add support for bookmarking via shiny.bookmark
          #1870
        
          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
          
     Merged
      
      
    
  
     Merged
                    Changes from 43 commits
      Commits
    
    
            Show all changes
          
          
            68 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      d3b5c45
              
                Input serializers and serializer method
              
              
                schloerke e43d33c
              
                Add utils; `is_hosted()` needs to be inspected
              
              
                schloerke 3136d3d
              
                Create _serializers.py
              
              
                schloerke 1ef9e82
              
                Create _save_state.py
              
              
                schloerke e3d6a7f
              
                First pass at `ShinySaveState` class; Implemented `_save_state()` and…
              
              
                schloerke 8600686
              
                typo
              
              
                schloerke 505e027
              
                Fix circular dep
              
              
                schloerke 25ba8b4
              
                Set up bookmark exclude and bookmark store
              
              
                schloerke dddafe6
              
                Update _bookmark.py
              
              
                schloerke 5681da8
              
                `Callbacks` and `AsyncCallbacks` added param support
              
              
                schloerke 2f80153
              
                `session.do_bookmark()` is functional in `"url"` and `"server"`
              
              
                schloerke a40f268
              
                Use a Bookmark class
              
              
                schloerke cbc303c
              
                Add notes on local storage; lints
              
              
                schloerke 953b896
              
                Fix express module bookmarking
              
              
                schloerke e2f838e
              
                Update .gitignore
              
              
                schloerke da07a41
              
                Rearrange file content
              
              
                schloerke 24c134b
              
                Move express stub bookmark object
              
              
                schloerke 2d7e0c9
              
                Update _bookmark.py
              
              
                schloerke 99ecada
              
                Update _utils.py
              
              
                schloerke b0bf3db
              
                Move BookmarkState class to sep file
              
              
                schloerke 1b48419
              
                First pass at restore state. **many** debug statements. Modules are s…
              
              
                schloerke a798507
              
                Restore input_radio_buttons!
              
              
                schloerke 2d6af57
              
                lints
              
              
                schloerke a63f389
              
                Merge branch 'main' into bookmarking
              
              
                schloerke 80f6091
              
                Add a `shiny.bookmark.globals` module
              
              
                schloerke 30c8dd8
              
                Add `shiny.bookmark.input_bookmark_button()`; Use globals to set book…
              
              
                schloerke b89bc9e
              
                Reduce comments
              
              
                schloerke 3082912
              
                Clean up comments
              
              
                schloerke a889407
              
                Use on_flush (not on_flushed) when calling restored callbacks
              
              
                schloerke 3319fb1
              
                Export `shiny.bookmark.restore_input()`
              
              
                schloerke ab42bff
              
                Add warning statements; Remove many print statements
              
              
                schloerke 3de1378
              
                Docs
              
              
                schloerke f65f120
              
                Safely create the dir using `exist_ok=True`
              
              
                schloerke 27b88b5
              
                Fix bug where the proxy session didn't have a restore context
              
              
                schloerke 6c4f596
              
                Add bookmark workaround for `on_restored()` callbacks not executing o…
              
              
                schloerke f6a38e7
              
                Use `App.bookmark_store` to be the source of truth for `session.bookm…
              
              
                schloerke 9f15505
              
                Fix server-side values not being restored
              
              
                schloerke 3df0026
              
                Move files around. Add `shiny.bookmark. set_save_dir()` and `set_rest…
              
              
                schloerke 79dd52b
              
                Remove comments and fix lints
              
              
                schloerke 8be292d
              
                Add docs; Rename `ShinySaveState` -> `BookmarkState`
              
              
                schloerke a6d3149
              
                Clean up TODOs
              
              
                schloerke edaf393
              
                Merge branch 'main' into bookmarking
              
              
                schloerke c7a3a3b
              
                Get express mode to work! 🎉
              
              
                schloerke 892cbfd
              
                Merge branch 'main' into bookmarking
              
              
                schloerke cfd3bba
              
                Merge branch 'main' into bookmarking
              
              
                schloerke 59e2cae
              
                Add tests for bookmarking
              
              
                schloerke 221dc0d
              
                Merge branch 'bookmarking' of https://github.com/posit-dev/py-shiny i…
              
              
                schloerke 0fd3921
              
                Add some examples (not finished)
              
              
                schloerke 4199f29
              
                Followup from #1898
              
              
                schloerke aadf050
              
                Merge branch 'main' into bookmarking
              
              
                schloerke a50860e
              
                Allow for App to set bookmark save/restore dir functions
              
              
                schloerke 5302f90
              
                lints
              
              
                schloerke 5b2db2a
              
                Revamp is_hosted() -> in_shiny_server()
              
              
                schloerke 1daae23
              
                Add warning for when bookmark is requested but it is disabled
              
              
                schloerke 5192884
              
                First pass of using `._session._parent.bookmark` instead of `._root_b…
              
              
                schloerke 63333bb
              
                Test for recursive module bookmarking
              
              
                schloerke 8b0a85a
              
                Update _quartodoc-core.yml
              
              
                schloerke b00d2a8
              
                Require that a `ResolvedId` is supplied to `restore_input()`
              
              
                schloerke 69272f9
              
                Use JSON instead of pickle files for storage of bookmarks
              
              
                schloerke 663f028
              
                lint
              
              
                schloerke 8b982af
              
                Add notes on why a temp dir is used
              
              
                schloerke df9f9bd
              
                Clean up bookmarking classes to reduce abstract methods only required…
              
              
                schloerke 8fbd8f2
              
                Update warning message for when a user doesn't supply a function and …
              
              
                schloerke fe4c0e8
              
                docs
              
              
                schloerke 6ad1345
              
                Update app.py
              
              
                schloerke cd069b9
              
                lint
              
              
                schloerke 7ffe2a6
              
                lints
              
              
                schloerke 1dee754
              
                Increase timeout for flakey test
              
              
                schloerke File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| from ._bookmark import ( | ||
| Bookmark, | ||
| BookmarkApp, | ||
| BookmarkExpressStub, | ||
| BookmarkProxy, | ||
| ) | ||
| from ._button import input_bookmark_button | ||
| from ._external import set_restore_dir, set_save_dir | ||
| from ._restore_state import RestoreContext, RestoreState, restore_input | ||
| from ._save_state import BookmarkState | ||
|  | ||
| __all__ = ( | ||
| # _bookmark | ||
| "Bookmark", | ||
| "BookmarkApp", | ||
| "BookmarkProxy", | ||
| "BookmarkExpressStub", | ||
| # _button | ||
| "input_bookmark_button", | ||
| # _external | ||
| "set_save_dir", | ||
| "set_restore_dir", | ||
| # _restore_state | ||
| "RestoreContext", | ||
| "RestoreState", | ||
| "restore_input", | ||
| # _save_state | ||
| "BookmarkState", | ||
| ) | 
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.