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

edit card name #172

Merged
merged 14 commits into from
Nov 25, 2022
Merged

edit card name #172

merged 14 commits into from
Nov 25, 2022

Conversation

mhallal1
Copy link
Contributor

@mhallal1 mhallal1 commented Nov 22, 2022

closes #94

After discussion with team members @nikolas-burkoff and @Polkas, we decided the following:

  1. the module developer can set a default card label in the card function (it can be unnamed also)
  2. the module user can change the card label with the UI input
  3. No support for passing the module name by default to the reporter cards till the teal refactor is accomplished as it requires passing the label argument to the server function of all modules.

R/AddCardModule.R Outdated Show resolved Hide resolved
@mhallal1 mhallal1 added the core label Nov 22, 2022
shiny::textInput(
ns("label"),
"Card Name",
value = "",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like the modules should be able to give a default to here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this requires passing label as an argument to add_card_button_srv and simple_reporter_srv.

Copy link
Contributor

@Polkas Polkas Nov 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I think it could be a good move as we are not hiding some value internally. The label argument can by "" by default.

Copy link
Contributor

@Polkas Polkas Nov 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another way can be to not have any default for label then to have empty name if not specified.when card is added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup that's definitely a better way of adding it - though we'd still need to pass the label into the module args - might be best to not do that right now though and wait until teal is reconfigured to make that not needed...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another way can be to not have any default for label then to have empty name if not specified.when card is added.

Or to have the name the module developer has set for it (rather than the app developer).

Copy link
Contributor Author

@mhallal1 mhallal1 Nov 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the latest update is:

  1. the module developer can set a default card label in the card function (it can be unnamed also)
  2. the module user can change the card label with the UI input
  3. No support for passing the module name by default to the reporter cards till the teal refactor is accomplished as it requires passing the label argument to the server function of all modules.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 22, 2022

badge

Code Coverage Summary

Filename              Stmts    Miss  Cover    Missing
------------------  -------  ------  -------  ----------------------------------------------------------------------------------
R/AddCardModule.R       140       1  99.29%   195
R/Archiver.R             25       0  100.00%
R/ContentBlock.R         16       0  100.00%
R/DownloadModule.R      193      49  74.61%   85-91, 103-107, 136, 161-166, 175-179, 182-186, 194-198, 201-205, 212-216, 219-223
R/FileBlock.R            13       0  100.00%
R/NewpageBlock.R          2       0  100.00%
R/PictureBlock.R         30       1  96.67%   15
R/Previewer.R           258      59  77.13%   67-71, 146, 162, 164-170, 173-179, 293-337
R/RcodeBlock.R           15       0  100.00%
R/Renderer.R             72      13  81.94%   158, 160-172, 189, 193
R/ReportCard.R           78       4  94.87%   72-73, 223, 244
R/Reporter.R             96       1  98.96%   255
R/ResetModule.R          55       0  100.00%
R/SimpleReporter.R       24       0  100.00%
R/TableBlock.R            8       0  100.00%
R/TealReportCard.R       31       0  100.00%
R/TextBlock.R            13       0  100.00%
R/utils.R                78      66  15.38%   7, 38-97, 99, 102-109
R/yaml_utils.R           74       2  97.30%   65, 263
TOTAL                  1221     196  83.95%

Diff against main

Filename             Stmts    Miss  Cover
-----------------  -------  ------  -------
R/AddCardModule.R      +10      +1  -0.71%
TOTAL                  +10      +1  +0.05%

Results for commit: a95d7ff

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Nov 22, 2022

Unit Tests Summary

    1 files    19 suites   9s ⏱️
208 tests 208 ✔️ 0 💤 0
347 runs  347 ✔️ 0 💤 0

Results for commit fc0d66f.

♻️ This comment has been updated with latest results.

@mhallal1 mhallal1 mentioned this pull request Nov 23, 2022
R/AddCardModule.R Outdated Show resolved Hide resolved
R/AddCardModule.R Outdated Show resolved Hide resolved
Copy link
Contributor

@Polkas Polkas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mhallal1 mhallal1 merged commit 6683d90 into main Nov 25, 2022
@mhallal1 mhallal1 deleted the 94_editable_card_names@main branch November 25, 2022 06:24
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 this pull request may close these issues.

Editable Card names
3 participants