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

Including File Browser Experience in Jupyter-UI #4

Open
ImperatorRaj opened this issue Jul 1, 2024 · 4 comments
Open

Including File Browser Experience in Jupyter-UI #4

ImperatorRaj opened this issue Jul 1, 2024 · 4 comments

Comments

@ImperatorRaj
Copy link

I want to include the file browser experience in the Jupyter UI of my Create React App , Kindly let me know the Components that need to be included to get the File browser on top of the Notebook, as shown below. cc @echarles

image
@echarles
Copy link
Contributor

echarles commented Jul 1, 2024

Hi @ImperatorRaj you can can compose the webapp adding the FileManager (pure react or lumino variant) https://jupyter-ui-storybook.datalayer.tech/?path=/docs/components-filemanager--docs to the notebook

Another would be to just create a JupyterLabApp with a limited set of jupyterlab plugins (see the example https://github.com/datalayer/jupyter-ui/blob/main/packages/react/src/examples/JupyterLabHeadlessApp.tsx)

@echarles
Copy link
Contributor

echarles commented Jul 1, 2024

or if you want something really like jupyterlab, see this example https://github.com/datalayer/jupyter-ui/blob/main/packages/react/src/examples/JupyterLabApp.tsx

@ImperatorRaj
Copy link
Author

ImperatorRaj commented Jul 2, 2024

Is there a component that helps load the File browser alone (same as the existing JupyterLab) ? Since I want to get only the file browser, but the example has lot many components that have to be included as part of it. cc @echarles

Here's my existing code rendering the Jupyter Component and Notebook: (in my App.tsx file)

const App = () => {
  const [tab, setTab] = useState(0);
  return (
    <>
      <Box>
        <Jupyter startDefaultKernel={true}>
          { tab === 0 &&
            <>
              <hr/>
              <JupyterLabApp/>
              <Notebook
                path="/ping.ipynb"
                CellSidebar={CellSidebarRun}
          />
            </>
          }
         </Jupyter>
      </Box>
    </>
  );
}

@echarles
Copy link
Contributor

echarles commented Jul 2, 2024

can be used eg https://github.com/datalayer/jupyter-ui/blob/main/packages/react/src/examples/FileBrowser.tsx

But you will have to manage your self the events, we have a TODO btw on that datalayer/jupyter-ui#76

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

No branches or pull requests

2 participants