-
Notifications
You must be signed in to change notification settings - Fork 305
Mount a directory from the browser #1482
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
Conversation
@adamziel and I took a look at the code together. @brandonpayton this PR has instructions required for the markdown plugin button. |
I am trying to mount a plugin to If someone is able to take a look, I am playing with it at https://pluginade.com My code is
|
@johnstonphilip This code was designed to work within Playground and it can't be called from the outside. For this to work we would need to add a method to the Playground client. What are you trying to build? How is the directory mounting useful to you? |
@bgrgicak I am trying to build a quick and easy way to test a plugin that you might have on your local computer. So essentially I am hoping people can click a button, browse to a plugin on their computer, and have it get mounted into wp-content/plugins. From there they could make code changes locally and test them immediately inside Playground. |
Adding support for triggering directory mounting makes sense to me. It could also be useful for the Playground website to have this as a single function in the future. |
@bgrgicak I am a little confused about the developer documentation showing mounting information here: I guess I am not sure where am I supposed to use that code. Is that supposed to be part of the documentation already? |
No, it shouldn't have been added to the documentation. @adamziel I was thinking of adding a |
Motivation for the change, related issues
We would like to enable developers to mount local directories into their Playground-based projects by prompting users to select a directory. After the directory is selected the folder can be mounted into Playground and used by it.
For example, this could be used to load local plugins and themes into Playground.
Implementation details
This PR adds a window message listener that takes the provided directory handle and mounts it to the mountpoint.
Testing Instructions (or ideally a Blueprint)
packages/playground/remote/src/lib/worker-thread.ts
/wp-content/uploads/markdown/YOUR-HTML-FILE.html