-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Vignette: shiny as a module #1467
base: main
Are you sure you want to change the base?
Conversation
Unit Tests Summary 1 files 28 suites 11m 6s ⏱️ Results for commit 58bd91d. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Results for commit 462e434 ♻️ This comment has been updated with latest results. |
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.
Looks good some minor comments about wording. Feel free to ignore
if (interactive()) { | ||
shinyApp(ui_app, srv_app) | ||
} | ||
``` |
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.
Perhaps a final comment on the example would be good. Like describing the differences with a pure teal app from the final end user (or for the app developer: would it work without teal_data()
? )
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.
describing the differences with a pure teal app from the final end user
What do you mean? Isn't "Unlike init()
, this module will not automatically include session info footer" enough?
would it work without
teal_data()
No it wouldn't. But what do you think I should add? data
, modules
and filter
arguments are well documented in module_teal
.
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.
What do you mean? Isn't "Unlike
init()
, this module will not automatically include session info footer" enough?
For example, when I created this app, the left panel was not there, this is evident for us but it might not be so for new users or app developers that might not know how it works. I usually struggle with vignettes that don't lower the level and assume the user already knows the package.
would it work without
teal_data()
No it wouldn't. But what do you think I should add?
data
,modules
andfilter
arguments are well documented inmodule_teal
.
The idea behind vignettes in my opinion are to serve as introduction to the user. If this is documented on module_teal
we can mention this to redirect the users to the detailed documentation of the function or to other vignettes.
My personal preference is to provide extra guidance than assume the user already knows something and not following through the vignette. But it is hard to set the level required for a vignette. Please feel free to resolve this conversation
vignettes/teal-as-a-module.Rmd
Outdated
Example below shows how to use the Teal module in Shiny app. In the example `srv_teal()` is called with the dynamic | ||
data created in the server of the parent app. | ||
|
||
```{r setup} |
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.
I think it is better to use: suppressPackageStartupMessages(library("teal"))
as it makes it evident to the user that there will be some messages on loading the library (and are not caught off guard if the messages appear when on the vignette there are none).
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 don't have an opinion about what is better, but if you believe so I probably should change all library(teal)
in the package's vignettes.
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 mean for me it is not super critical. On the other side sometimes people is surprised when a certain function appears on their namespace or it is masked by a new loaded package.
closes #1450