-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
198 Include user's card labels when generating the report #219
Conversation
…eter for card's title & content customization.
Code Coverage Summary
Diff against main
Results for commit: 29be0e6 Minimum allowed coverage is ♻️ 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.
In the report, there is a blank header when Rcode is included. I previously added a blank header in teal.reporter to move content to another slide. This issue can be resolved by replacing ###
with ---
.
Line 126 in a03da37
"### ", |
Is this in the scope of this feature?
Can you make a separate branch and a separate fix, so this is cleaner and
only focuses on what we initially discussed?
|
Not exactly but it affects report with Rcode is created but I have included this change in PR. so no worries. The solution looks good and I recommend creating separate tasks for each package to facilitate easy tracking. This applies to teal.module.clinical, teal.modules.general, teal.modules.hermes, teal.osprey, and teal.goshawk. All these modules utilize the reporter. |
Co-authored-by: kartikeya kirar <[email protected]> Signed-off-by: Marcin <[email protected]>
Hey @lcd2yyz and @donyunardi - pinging you here to double check you are ok with the proposed changes? Is this the desired behavior? If yes, I will proceed with this change in other packages listed by @kartikeyakirar above |
Hey @lcd2yyz and @donyunardi - we are ready to merge. Just waiting for your final green light. |
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.
Thanks for working on this @m7pr
I think the solution is great and very subtle.
this PR fixes #583 this is follow-up after insightsengineering/teal.reporter#219 --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This PR allows end user to use their Card Name (label) to be passed to the Card Content. There are no more hardcoded titles. The hardcoded titles will be only used if Card Name (label0) is empty. A follow-up after insightsengineering/teal.reporter#219 --------- Signed-off-by: André Veríssimo <[email protected]> Co-authored-by: André Veríssimo <[email protected]> Co-authored-by: unknown <[email protected]>
this PR fixes #335 this is follow-up after insightsengineering/teal.reporter#219 --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
this PR fixes #228 this is follow-up after insightsengineering/teal.reporter#219 --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
this PR fixes #240 this is follow-up after insightsengineering/teal.reporter#219 --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
Closes #198 and accompanied by insightsengineering/teal.modules.clinical#835
The problem
Currently most of the
teal
modules, that wrap upteal.reporter
in their UI, have titles of theReportCard
hardcoded in their body. For example check out below 2 moduleshttps://github.com/insightsengineering/teal.modules.clinical/blob/2b20a85b22f25f15f6808f745b4d1d5333b123f3/R/tm_g_ci.R#L484-L503
https://github.com/insightsengineering/teal.modules.clinical/blob/2b20a85b22f25f15f6808f745b4d1d5333b123f3/R/tm_g_km.R#L774-L793
Such hardcoded content in
card$set_name()
andcard$append_text()
has a great impact on the finalReportCard
.If
label
in theAdd Card
module UI is not provided, then the card name is set to the one passed incard$set_name()
. This is fine for cards that had empty labels - they will have a name populated by the developer of the teal module.However
card$append_text()
like thishttps://github.com/insightsengineering/teal.modules.clinical/blob/2b20a85b22f25f15f6808f745b4d1d5333b123f3/R/tm_g_km.R#L778
and this
https://github.com/insightsengineering/teal.modules.clinical/blob/2b20a85b22f25f15f6808f745b4d1d5333b123f3/R/tm_g_ci.R#L489
appends a content to the card. The card gets a hardcoded title, no matter what user specifies as a card label.
The solution
add_card_button_srv
allows to specifycard_fun
withlabel
parameter for card's title & content customization. This means, that you are able to uselabel
shiny input and use it in yourcard_fun
to pass the title. We are able to rewrite teal modules, so that they have default titles, iflabel
is empty inAdd Card
module UI. When it is not empty, then thelabel
is used as a name and as a title of the card - like in this commit insightsengineering/teal.modules.clinical@5833c6cWith label
Without the label
so the default
teal
module name and title are used