Skip to content
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

Implement a shiny module that adds ReportCards to Report #12

Closed
Tracked by #11
kpagacz opened this issue Mar 18, 2022 · 0 comments · Fixed by #23
Closed
Tracked by #11

Implement a shiny module that adds ReportCards to Report #12

kpagacz opened this issue Mar 18, 2022 · 0 comments · Fixed by #23
Assignees
Labels

Comments

@kpagacz
Copy link
Contributor

kpagacz commented Mar 18, 2022

linked to insightsengineering/NEST-roadmap#11

Marked add_report_card_server and add_report_card_ui on the diagram: https://app.diagrams.net/#G1MOUaQWakvtz0D_S6VlhHY8j8qzDu1qCW

This task includes implementing two functions returning the said shiny modules. It does not include creating a module for rendering or storing a report.

Its functionality should be limited to just adding a ReportCard object to Report. Here are some wireframes specifying what it should look like: https://balsamiq.cloud/st5j94y/pkhl0a6/r80A7

A general idea is:

  • from the UI perspective - a button that opens a modal with a question for confirmation of adding a report card and optionally additional information passed to the ReportCard (OOP instance) (comments? etc...)
  • from the server perspective - it should add a copy of the ReportCard (OOP instance) object to Report (singleton instance).

Each teal module in the app (like tm_g_scatterplot, tm_crosstable, .. ) shares the Report (singleton instance).
And each teal module will have in the server/ui part this (addCard) module. The server part will be reactive to the UI part and will add a new ReportCard (OOP instance) to the Report (singleton instance).

The UI part is located in each teal module UI/(or one global), and has to be conditional. So if we are not using the Reporter the UI should not be included. Button per each module seems to be a better choice?

UI:

Design: https://getbootstrap.com/docs/4.0/components/modal/#modal-components

Server (snippet) - idea:

    # inside tm_g_   server 
    # observe addCard ui clicked
    observe 
    {
    CustomreportCard <- NESTreportCard$new() # vs BASEreportCard (object, title and footnote)
    CustomreportCard$add_plot(plot_r(), plot_height = NULL, plot_width = NULL) # reactive
    CustomreportCard$add_title(title = "Custom per module title")

    # it will add comment to CustomreportCard
    # add card to reporter (singleton instance)
    srv_addbutton(
      reporter,
      CustomreportCard
    )
   }

Edit: @Polkas

@kpagacz kpagacz added the core label Mar 18, 2022
@kpagacz kpagacz transferred this issue from another repository Mar 23, 2022
@gogonzo gogonzo transferred this issue from insightsengineering/teal Mar 30, 2022
@Polkas Polkas self-assigned this Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants