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

Page parameter pluto_server_url overrides default WebSocket address #2570

Merged
merged 4 commits into from
May 24, 2023

Conversation

ctrekker
Copy link
Collaborator

The Pluto.jl desktop app needs a way to tell Pluto explicitly where to find a Pluto.jl WebSocket server running, since frontend assets are served directly from the filesystem (a file:https:// url). As far as I can tell, there was no way to do this already built into Pluto.jl, so this PR adds a page parameter to the editor and welcome screen which overrides the default websocket url behavior.

@github-actions
Copy link
Contributor

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="cb/desktop-app")
julia> using Pluto

@fonsp
Copy link
Owner

fonsp commented May 23, 2023

Nice! Can you re-use the pluto_server_url for this? Right now the only purpose is to define where a featured notebook preview should make the /open request, but maybe this setting can also be used as the "where is the WS server" setting.

If that doesn't work then lets go for this!

@ctrekker ctrekker changed the title Page parameter ws_url for desktop app Page parameter pluto_server_url overrides default WebSocket address May 23, 2023
@ctrekker
Copy link
Collaborator Author

Adding websocket-related behavior for pluto_server_url will work, at least for PlutoDesktop! My only worry is that these changes may cause issues for binder. I'm not sure how to test these changes on binder without them being included in a release

@ctrekker ctrekker added frontend Concerning the HTML editor PlutoDesktop labels May 23, 2023
@fonsp
Copy link
Owner

fonsp commented May 24, 2023

Copy link
Owner

@fonsp fonsp left a comment

Choose a reason for hiding this comment

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

Binder still works 👍

@fonsp fonsp merged commit 4d9596b into main May 24, 2023
@fonsp fonsp deleted the cb/desktop-app branch May 24, 2023 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Concerning the HTML editor PlutoDesktop
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants