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

Move default viewers to vars #167

Merged
merged 7 commits into from
Jun 9, 2022
Merged

Move default viewers to vars #167

merged 7 commits into from
Jun 9, 2022

Conversation

mk
Copy link
Member

@mk mk commented Jun 9, 2022

To make inspecting & building on them easier. Use this to implement an example dashboard viewer that only shows the last result. This can be useful to build apps or dashboard without needing to hide every cell & result except one.

(def last-result-viewer
  (update v/notebook-viewer :transform-fn (fn [transform-fn-orig]
                                            (comp transform-fn-orig
                                                  (clerk/update-val (fn [doc] (update doc :blocks (partial take-last 1))))))))

Fixes #133.

@mk mk merged commit 67315c3 into main Jun 9, 2022
@mk mk deleted the viewer-vars branch June 9, 2022 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clerk Dash?
2 participants