-
Notifications
You must be signed in to change notification settings - Fork 79
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
Pass more Context to Viewer Functions + Cell Viewer #575
Conversation
fd6973b
to
9167295
Compare
notebooks/viewers/context.clj
Outdated
(-> cell :result :nextjournal/value (as-> n (when (number? n) (even? n))))) | ||
:show | ||
%)))))) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mk maybe an early feedback on this one 👆.
In some sense, controlling visibility is not "close to" the actual values which we want to display/hide. Unlike the usual customization of dedicated viewers matching different values, here we have just one spot in which to combine different predicates. Maybe good so anyway.
# Conflicts: # src/nextjournal/clerk/viewer.cljc
for ease of testing scenarios when we just can't wrap a value
this allows to easily hide anonymous toplevel forms, but still show examples
I checked that slideshow viewer still works, as this is the usual suspect when changing the shape of a presented notebook. Moreover #593 is not a regression from these changes, I'll fix that in a separate commit. |
:wrapped
key, its value is called against the whole wrapped value instead of just the value