Use picks in tm_g_spiderplot module#336
Conversation
Code Coverage SummaryDiff against mainResults for commit: 458d0dd Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Test Performance Difference
Additional test case details
Results for commit d7bfa35 ♻️ This comment has been updated with latest results. |
|
Right now this PR keeps both APIs
which is a reasonable incremental step. However I though we agreed that for modules without I think we should align on how we move forward |
|
I agree, since this are |
|
I have added more changes to the module. Note that the PR of butterfly module should be reviewed first. The changes are:
|
averissimo
left a comment
There was a problem hiding this comment.
Functionality seems to work as expected 💯
I have some suggestions and topics of discussion, first on is: "Is butterfly wrongly included here?" 😅 I assumed so after running the example.
Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Signed-off-by: Oriol Senan <35930244+osenan@users.noreply.github.com>
Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Signed-off-by: Oriol Senan <35930244+osenan@users.noreply.github.com>
Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Signed-off-by: Oriol Senan <35930244+osenan@users.noreply.github.com>
Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Signed-off-by: Oriol Senan <35930244+osenan@users.noreply.github.com>
|
I try to implement all comments. In addition, I made change in the UI server to use formals and declare all arguments. |
Unit Tests Summary 1 files 8 suites 1s ⏱️ For more details on these failures, see this check. Results for commit f6300d2. ♻️ This comment has been updated with latest results. |
Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Signed-off-by: Oriol Senan <35930244+osenan@users.noreply.github.com>
|
Thanks for the last review, I fixed branching issues and added very minor changes on documentation and a small refactor on how we check picks to be single |
averissimo
left a comment
There was a problem hiding this comment.
Some minor comments regarding documentation and there's 1 comment left resolving from my previous review.
It should be ready to merge after these are addressed
| #' @param paramcd Either a ([`teal.transform::choices_selected`]) | ||
| #' `choices_selected` object or a (`[teal.picks::variables()]`) | ||
| #' variable value designating the studied parameter. | ||
| #' @param x_var Either a ([`teal.transform::choices_selected`]) | ||
| #' `choices_selected` object or a (`[teal.picks::variables()]`) x-axis variables | ||
| #' @param y_var Either a ([`teal.transform::choices_selected`]) | ||
| #' `choices_selected` object or a (`[teal.picks::variables()]`) y-axis variables | ||
| #' @param marker_var Either a ([`teal.transform::choices_selected`]) | ||
| #' `choices_selected` object or a (`[teal.picks::variables()]`) variable dictates marker symbol | ||
| #' @param line_colorby_var Either a ([`teal.transform::choices_selected`]) | ||
| #' `choices_selected` object or a (`[teal.picks::variables()]`) variable dictates line color | ||
| #' @param vref_line vertical reference lines |
There was a problem hiding this comment.
Please document all these arguments the other way round with teal.picks being referenced first as it is the preferred way.
| #' @param xfacet_var Either a ([`teal.transform::choices_selected`]) | ||
| #' `choices_selected` object or a (`[teal.picks::variables()]`) variable for x facets | ||
| #' @param yfacet_var Either a ([`teal.transform::choices_selected`]) | ||
| #' `choices_selected` object or a (`[teal.picks::variables()]`) variable for y facets |
There was a problem hiding this comment.
Please document all these 2 arguments the other way round with teal.picks being referenced first as it is the preferred way.
| paramcd_col <- merged$variables()$paramcd | ||
| paramcd <- input$paramcd_val | ||
| x_var <- merged$variables()$x_var | ||
| y_var <- merged$variables()$y_var | ||
| marker_var <- merged$variables()$marker_var | ||
| line_colorby_var <- merged$variables()$line_colorby_var | ||
| anno_txt_var <- input$anno_txt_var | ||
| legend_on <- input$legend_on | ||
| xfacet_var <- input$xfacet_var | ||
| yfacet_var <- input$yfacet_var | ||
| xfacet_var <- merged$variables()$xfacet_var | ||
| yfacet_var <- merged$variables()$yfacet_var | ||
| vref_line <- input$vref_line | ||
| href_line <- input$href_line |
There was a problem hiding this comment.
[optional]
All of these variables overwrite the arguments with same name. This isn't ideal, but an improvement on this module would be to add a suffix _selected or _sel to better differentiate.
There was a problem hiding this comment.
I will annotate this as a suggestion in the issue to unify patterns
Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Signed-off-by: Oriol Senan <35930244+osenan@users.noreply.github.com>
Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Signed-off-by: Oriol Senan <35930244+osenan@users.noreply.github.com>
Partially closes issue #330
I also found a bug while testing the examples, if we have only one choice the UI of the picks component does not look ok.
The changes are:
Create method dispatch based on
x_var. Refactor ui and server function to use picks instead of choices selected. I was able to remove some code of features handled by picks automatically like the merge. Maybe part of the validation should be implemented again, but I think I could remove it as well.This app is a good test, it assumes you have
teal.picksinstalled from latest main and are in this branch.