Skip to content
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

Revision of PR #1376 implementing the Solara FileBrowser #2467

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bmorris3
Copy link
Contributor

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.

maartenbreddels and others added 5 commits September 19, 2023 14:19
This file browser is more in line with the rest of the look and feel
(not based on ipywidgets-controls, but on ipyvuetify).

Also, looking at the comments at spacetelescope#573 this is implemented using:

   * Single click to select a directory or file
   * Import button for directory or file
   * Double click to quickly import a file.

Tooltips are added to make clear what each button does, or why
it is disabled.

This requires solara >= 0.3
@maartenbreddels
Copy link
Collaborator

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.

kecnry added a commit to kecnry/jdaviz that referenced this pull request Jun 5, 2024
Co-authored-by: Brett M. Morris <morrisbrettm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants