Skip to content

Conversation

@mscolnick
Copy link
Contributor

@mscolnick mscolnick commented Jun 18, 2025

This allows you to upload the folder with items and will keep the same folder structure.

This also adds a PDF viewer to the file explorer sidebar

@vercel
Copy link

vercel bot commented Jun 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 3:41pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to enhance the file explorer sidebar by enabling folder uploads that retain the original hierarchy and by introducing a PDF viewer for file previewing.

  • Introduced logic in the upload module to extract and use folder paths from file inputs.
  • Added a PdfViewer component and integrated it into the file viewer.
  • Updated media detection logic to include PDF files.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
frontend/src/components/editor/file-tree/upload.tsx Added logic for folder upload and functions to process file paths.
frontend/src/components/editor/file-tree/renderers.tsx Added a new PdfViewer component.
frontend/src/components/editor/file-tree/file-viewer.tsx Integrated PdfViewer and updated media handling for PDFs.
Comments suppressed due to low confidence (1)

frontend/src/components/editor/file-tree/upload.tsx:48

  • Method name 'guessDeliminator' might be a typo; consider renaming it to 'guessDelimiter' to improve clarity.
          directoryPath = PathBuilder.guessDeliminator(filePath).dirname(

manzt
manzt previously approved these changes Jun 19, 2025
Copy link
Contributor

@manzt manzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just a couple of suggestions with helper functions for branded types.

Co-authored-by: Trevor Manz <trevor.j.manz@gmail.com>
@mscolnick mscolnick merged commit d7df0ec into main Jun 19, 2025
23 of 24 checks passed
@mscolnick mscolnick deleted the ms/folder-upload branch June 19, 2025 15:50
sebbeutler pushed a commit to sebbeutler/marimo that referenced this pull request Jun 28, 2025
marimo-team#5349)

This allows you to upload the folder with items and will keep the same
folder structure.

This also adds a PDF viewer to the file explorer sidebar

---------

Co-authored-by: Trevor Manz <trevor.j.manz@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
sebbeutler pushed a commit to sebbeutler/marimo that referenced this pull request Jul 7, 2025
marimo-team#5349)

This allows you to upload the folder with items and will keep the same
folder structure.

This also adds a PDF viewer to the file explorer sidebar

---------

Co-authored-by: Trevor Manz <trevor.j.manz@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants