-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Filter Panel - global turn on/off button #123
Conversation
Signed-off-by: Maciej Nasinski <[email protected]>
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.
I like the idea and implementation. I also prefer to remove and restore filters than having two reactives for enable/disable.
Co-authored-by: Dony Unardi <[email protected]> Signed-off-by: Maciej Nasinski <[email protected]>
Co-authored-by: Dony Unardi <[email protected]> Signed-off-by: Maciej Nasinski <[email protected]>
Code Coverage Summary
Diff against main
Results for commit: be62bb3 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Co-authored-by: Dony Unardi <[email protected]> Signed-off-by: Maciej Nasinski <[email protected]>
…ineering/teal.slice into 84_global_onoff@main
R/FilteredData.R
Outdated
@@ -904,6 +972,12 @@ FilteredData <- R6::R6Class( # nolint | |||
# private attributes ---- | |||
filtered_datasets = list(), | |||
|
|||
# turn on / off filter panel | |||
filter_turn = TRUE, |
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.
(copied from closed PR as I still think it's relevant)
-
I dislike the "turn" term here. You can turn left/right or on/off. It's a verb whereas you are looking for a noun. I propose state / status / active instead. Please change other places as well including method docs.
-
What's the point of this field? I ask from the class simplicity point of view.
I can see that it's used in the api class - there is a check whether it's active and if yes then you can do set/get/etc. Is that needed? The functionality would be anyway disabled from the GUI perspective (vide: disabling inputs). What I am suggesting here is that the big disable/enable button would just propagate this action to all relevant inputs + save/restore action and that's it. An object would not store its state as this opens a door for unnecessary complexity I believe. I am happy to discuss it further if needed.
Originally posted by @pawelru in #91 (comment)
By default shinyWidgets::switchInput
use the logical(1) for value so this should not be surprising I stay with this type.
filter_turn
variable is needed only for filter_panel_api, so we could provide a proper warning if sb want to update the state when filter panel is turn off.
I like the Turn Off/On naming, although I see you agree with Nik in this area so please update to the one you are preferring.
Originally posted by @Polkas in #91 (comment)
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.
- I am ok with the active naming convention.
- I feel you need a little bit of background and support. I am happy to help you here.
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.
@pawelru you did not answer to more important question which is if we want to support filter panel api at all or in what scope.
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.
we had a quick meeting to discuss the above and posting the outcomes just for the record
- the support/maintanance question is beyond this PR - a separate task
will behas been created to discuss and decide - clarifications of my point: I meant this functionality will be mostly implemented on frontend side - not really in the backend (as shiny part is already inside this class definition it has to be a separate method but I hope you got the point). This would keep this class much simpler. This also means that one might call object methods on inactive filter that doesn't make much sense but I am totally fine with it.
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.
@mhallal1 the help text will appear when you hover the slider. The minimalist design was applied on purpose. |
Signed-off-by: Maciej Nasinski <[email protected]>
linked to #127 |
Signed-off-by: Maciej Nasinski <[email protected]>
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.
👍 Tested apps and code - I'm happy to approve
closes #84
Global toggle for Filter Panel, where the hidden state is recovered when turn on.
The current UI design is following recommended by Pawel and Nina direction.
The PR is taken into account the filter_panel_api which is linked with it.
Please check out the discussion in #91