-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: added a verbatim_popup
module
#59
Conversation
if (inherits(verbatim_content, "reactive")) { | ||
shiny::validate(shiny::need( | ||
checkmate::assert_multi_class(verbatim_content(), classes = c("expression", "character")) | ||
)) |
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.
Initially, I had this validation somewhere else, now I am not sure it needs to be here or inside the module function (I think inside the module :( )
Code Coverage Summary
Results for commit: c5c20ba Minimum allowed coverage is ♻️ This comment has been updated with latest results |
export(verbatim_popup_srv) | ||
export(verbatim_popup_ui) |
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.
please modify _pkgdown
accordingly
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.
I am just curious why pkgdown workflow does not complain. That should be catched automatically. Will you be able to have a look at this and create a task for IDR if necessary? Many thanks!
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.
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.
brain fart - sorry
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.
Wundabar. Please add lifecycle experimental badges and add pkgdown entries.
Badges added. Pkgdown unchanged, it already lists |
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.
🚀
Closes #30
Test with the example replacing the contents of the modal. Also, have a look at the tests for examples of what should be allowed and what should not be allowed into the modal.
The idea is that behaviour is the same as the previous
get_rcode
module but without theget_eval_details
part.This just shows the content formatted as verbatim. Be aware that it will not format properly without
shiny
s bundled CSS, so it will not look as intended when the UI function is called outside of ashiny
object (like a fluid page in the example).I replaced the bloated
clipboard.js
with our own, custom js. Should be short enough to maintain.I would be glad if someone with MacOS tested the copying function because I have read about some edge cases with the Navigator API and MacOS. I have put some fallback code inspired by an so post, but I would sleep better if it was tested.