Skip to content

😵‍💫 Make the pluto-editor component embeddable inside a pluto editor #3169

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

Merged
merged 8 commits into from
Apr 14, 2025

Conversation

fonsp
Copy link
Owner

@fonsp fonsp commented Apr 4, 2025

Embedding Pluto inside Pluto was already possible (also without iframe since #1976). But this PR fixes some CSS issues where the two editors influence layout/styling of each other. E.g. the disable_ui feature is no longer global, but specific to each pluto-editor component.

Schermopname.2025-04-04.om.10.53.18.mov

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="embeddable-in-itself")
julia> using Pluto

TODO

  • Disable scroll on load?
  • Auto scroll on output height change – check for first parent that is scrolled, and scroll it more

@fonsp fonsp requested a review from Copilot April 4, 2025 08:58
@fonsp fonsp added enhancement New feature or request frontend Concerning the HTML editor publishing Notebooks as static documents on the web labels Apr 4, 2025
Copy link

@Copilot 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.

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

Files not reviewed (5)
  • frontend/editor.css: Language not supported
  • frontend/editor.html: Language not supported
  • frontend/hide-ui.css: Language not supported
  • frontend/index.css: Language not supported
  • frontend/treeview.css: Language not supported
Comments suppressed due to low confidence (1)

test/frontend/tests/safe_preview.js:49

  • The querySelector for 'pluto-editor' might return null if the element is not present, which will cause a runtime error when accessing its classList. Consider adding an assertion to ensure that the element exists before checking its class list.
expect(await page.evaluate(() => [...document.body.querySelector("pluto-editor").classList])).toContain("process_waiting_for_permission")

@fonsp

This comment was marked as resolved.

@fonsp fonsp merged commit 2b8b6d9 into main Apr 14, 2025
6 checks passed
@fonsp fonsp deleted the embeddable-in-itself branch April 14, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Concerning the HTML editor publishing Notebooks as static documents on the web
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant