Add folder share via link - #141
Conversation
|
I was thinking, should we have a show checkboxes dialog always when exporting the folder, or should there be a setting to ask that (show dialog on export something similar false by default), because maybe users might have some files they don't want to include, and in current mindset, they would still share it and dont have a way to exclude it |
Always by default sounds good to me
Yes, it could be more complex, see below
yes, or they may want to include some files that the heuristic would exclude (say My current thinking would be, let's add a setting "Show file selection dialog on export" with options:
Then, to make sure this is discoverable we could default to "Always" but in the dialog we could add checkbox like: |
For this, should we have a section in the dialog itself to show the auto-excluded files, and a person could include the file if they need to from there? ( across all three of setting ) |
Yes I think so. |
i have included them in the latest commit |
|
UX wise I am concerned about discoverability of the share folder option. I wonder if we should make the share button a dropdown:
|
Should we keep this in addition to the current implementation, or just this? maybe having both could make sense |
|
Having it in context menu too is fine |
There was a problem hiding this comment.
Pull request overview
Expands “share via link” to support sharing entire folders (packages) in addition to single files, including a file-selection dialog when needed and UI entry points from both the editor toolbar and file browser context menu.
Changes:
- Add folder-based share payload encoding/decoding and restore logic for multi-file shares.
- Introduce a folder file-selection dialog with auto-exclusion rules and a new setting to control when the dialog appears.
- Add editor toolbar share dropdown + file browser context menu integration, with updated UI tests and styling.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ui-tests/tests/plugin-playground.spec.ts | Adds UI coverage for file/folder sharing flows, dialog behavior, and toolbar/context menu actions. |
| style/base.css | Styles the new share dropdown button/caret and folder share selection dialog layout. |
| src/share-via-link-utils.ts | Implements folder share candidate filtering, payload building, and file-selection dialog UX. |
| src/share-link.ts | Extends share token format to support folder payloads and adds size-limit error classification. |
| src/index.ts | Wires folder sharing into the command, adds toolbar dropdown + context menu resolution, and restores shared folders from URL. |
| schema/plugin.json | Adds a new setting for dialog behavior and context menu entries for files/folders. |
| README.md | Updates command API docs and behavior notes to cover folder sharing and dialog modes. |
| package.json | Moves @jupyterlab/filebrowser into dependencies (runtime usage). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I'm planning for #152 to merge first since i introduced a new reusable component in there which would use here as well. https://github.com/jupyterlab/plugin-playground/pull/152/changes#diff-aaa7ba8da56b0390dea21df0f8d1c641de85d8754864ada8948888a94fcb7990 ( for split action since we are using the dropdown action in multiple places now - command insertion , export , sharing ) |
|
Show available space and auto-select files are included in this PR for #169 |
|
^picked up a conflict |
|
Yes sure! |
krassowski
left a comment
There was a problem hiding this comment.
I find it a bit confusing that clicking on a dropdown option on export changes action but does not invoke it, but dropdown options on share invokes action but I guess we can discuss this in #177 once this gets merged.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
One last change to make is to change the character count to be a percentage since it's easier to understand for new user than trying to understand what the URL count means here. |


closes #132
This update expands share-via-link so users can share both single files and entire folders directly from Plugin Playground. Sharing now works from the editor flow and from file browser right-click actions for both files and folders. Folder sharing includes a guided selection experience when content is too large, so users can choose which files to include and still generate a shareable link.