Closed anajens closed 9 months ago
@anajens would be able to provide some more context? Are you using any online app hosted on shinyapps? Is this some local code? Could you upload the code so I can reproduce the behavior?
Report labels are often hardcoded by card_fun
in
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
where you can specify what is added to appended text card$append_text("Your custom text", "header2")
once the card on the module is added.
To get custom labels be passed to a report card I think we should start changing the behavior in here https://github.com/insightsengineering/teal.reporter/blob/4fa942ec6c8c72f466505b969244c7a70d7e9f28/R/AddCardModule.R#L83
Hi @m7pr thanks for taking a look this!
This issue was from the last round of teal apps UAT and I used the safety app. You can reproduce this example with the current version: https://genentech.shinyapps.io/nest_safety_main/
In a nutshell, I think if the user takes the time to create meaningful labels for each card added to the report they should not be removed when the report is generated.
Thanks @anajens . For now I think the Card Names/Labels are just use in Reporter Preview module, but each card takes the content directly from how the module specified report content.
Ok, I see it now. For teal.modules.clinical
modules there are specific card_funs
that set a specific report card title, no matter what the provided card name is
https://github.com/search?q=repo%3Ainsightsengineering%2Fteal.modules.clinical%20set_name&type=code
To make your requested change we would need to
card_fun
in add_card_button_srv
teal.modules.clinical
and teal.modules.general
modules so that they have default card label and appended text, but if the card name/label is provided, then those should be overwritten by provided card name/labelI think I will need to double check with the team on how to proceed
Feature description
It would be helpful if the user's card labels are included in the report because the default module labels (eg "summary table") are too general.
Code of Conduct
Contribution Guidelines
Security Policy