jdaviz icon indicating copy to clipboard operation
jdaviz copied to clipboard

Revision of PR #1376 implementing the Solara FileBrowser

Open bmorris3 opened this issue 2 years ago • 2 comments

In #1376 @maartenbreddels demo'ed the Solara file browser for jdaviz. The implementation in that PR is hard to test for two reasons:

  1. jdaviz main has has diverged from the branch that Maarten worked on
  2. Maarten's PR removed the FileChooser object, but did not fully implement a solution for all of our uses of FileChooser (note: this PR doesn't solve this problem)

This PR gets the file browser working well enough to demonstrate @maartenbreddels's intended use case – replacing the backend on the IMPORT DATA button – but does not fully implement all of the From file... buttons in plugins.

This PR adds a simple/silly file validation step. The file browser will show directories in addition to files, and will only show files that are possible to load. For the purposes of this demo PR, I didn't create an exhaustive list of valid file extensions. We should ultimately connect this validation to the get_valid_format method to show the files compatible with this helper.

bmorris3 avatar Sep 19 '23 21:09 bmorris3

FYI, solara>=0.3.0 can now be replaces with solara-ui as a dependency, which will not take in the solara-server dependencies (starlette, uvicorn, ...) See https://solara.dev/changelog or https://solara.dev/documentation/getting_started/installing for more information.

maartenbreddels avatar Apr 09 '24 14:04 maartenbreddels