Clay integration — embed code-editor in notebooks#2
Merged
Conversation
8e0ff97 to
295ce04
Compare
show-piano-roll? moved into options map instead of reading from noon.client.state. doc.cljs provides a thin connected-code-editor wrapper that injects it.
- noon.viz.clay: editor fn emitting kind/hiccup for Clay notebooks - noon.widget: self-contained mounting layer with own stylefy init - Widget included in main client build via :entries (single build) - No init-fn: docs index.html and Clay pages call their entry points explicitly - Gitignore docs/ and notebooks/ (Clay output)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Minimal Clay integration: embed interactive noon code-editors in Clay notebook output.
Changes
Commit 1 — Decouple code-editor from global state
code_editor.cljs:show-piano-roll?is now a prop instead of reading fromnoon.client.statedoc.cljs: thinconnected-code-editorwrapper injects the global toggleCommit 2 — Clay integration
noon.viz.clay(~30 lines):(editor source)returnskind/hiccupfor Claynoon.widget(~45 lines): scans DOM for[data-noon-widget], mounts real code-editor:entriesin shadow module, no separate build)init-fn—index.htmland Clay pages call their entry points explicitly:clayalias in deps.edn (Clay 2.0.10 + Kindly)notebooks/clay_test.cljCommit 3 — gitignore Clay output
What was NOT taken from
widget-claybranchUsage
Requires
shadow-cljs watch clientrunning locally.