-
-
Notifications
You must be signed in to change notification settings - Fork 6
updateable count labels #198
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
updateable count labels #198
Conversation
updateable count labels
fix name and remove unneeded method
pickerInput applied only when closed!
correct id of input
- add docs - add asserts - fix reactivity in choicesFS
fix reactivity and pickerInput labels
All reactivity fixed
fix LogicalFilterState reactivity logs
fix styling
test: make_count_text, countLabel, countBar
hehe
tests
thanks @asbates --------- Co-authored-by: Andrew Bates <andrew.bates@atorusresearch.com>
… 174_checkbox_counts@filter_panel_refactor@main
tidyup css
include updateCountText to the docs
…lter_panel_refactor@main
|
I would consider having the progress bars CSS as the following.
.progress-bar.state-count-bar-filtered {
background-color: var(--bs-primary, rgb(51, 122, 183));
opacity: 0.8;
color: var(--bs-body-color, var(--dark, #333333));
overflow: visible;
text-align: left;
white-space: nowrap;
}
.progress-bar.state-count-bar-unfiltered {
background-color: var(--bs-primary, rgb(51, 122, 183));
opacity: 0.439;
border-top-right-radius: var(--bs-border-radius, .375rem);
border-bottom-right-radius: var(--bs-border-radius, .375rem);
} |
| .progress-bar.state-count-bar-filtered { | ||
| background-color: lightblue !important; | ||
| color: var(--bs-body-color, var(--dark, #333333)); | ||
| overflow: visible; | ||
| text-align: left; | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
| .progress-bar.state-count-bar-unfiltered { | ||
| background-color: rgba(173, 216, 230, 0.439) !important; | ||
| } |
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.
@asbates do you know how to apply alpha/opacity to the background only? Opacity affects text and background in the same time which means that it could be barely visible,
| .progress-bar.state-count-bar-filtered { | |
| background-color: lightblue !important; | |
| color: var(--bs-body-color, var(--dark, #333333)); | |
| overflow: visible; | |
| text-align: left; | |
| white-space: nowrap; | |
| } | |
| .progress-bar.state-count-bar-unfiltered { | |
| background-color: rgba(173, 216, 230, 0.439) !important; | |
| } | |
| .progress-bar.state-count-bar-filtered { | |
| background-color: var(--bs-primary, rgb(51, 122, 183)); | |
| opacity: 0.8; | |
| color: var(--bs-body-color, var(--dark, #333333)); | |
| overflow: visible; | |
| text-align: left; | |
| white-space: nowrap; | |
| } | |
| .progress-bar.state-count-bar-unfiltered { | |
| background-color: var(--bs-primary, rgb(51, 122, 183)); | |
| opacity: 0.439; | |
| border-top-right-radius: var(--bs-border-radius, .375rem); | |
| border-bottom-right-radius: var(--bs-border-radius, .375rem); | |
| } |
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 do not. Bootstrap uses hex for color variables and as of now there isn't a way to add alpha to an existing hex color. (apparently this is in the works). So setting opacity on the whole bars is probably not the way to go. The text looked light to me but I wanted to bring it up just in case it was just me.
meaningful output name
mhallal1
left a 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.
Issue created while reviewing this: #203
remove docs of inexisting argument
mhallal1
left a 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.
Tested locally and on BEE with multiple apps and conditions.
Works as expected.
… 174_checkbox_counts@filter_panel_refactor@main
remove unused exclude from the function.
@BLAZEWIM suggestion

closes #173 #174 #167
Tested on: chrome, safari and firefox with default shiny, BS3-5. No major styling/js issues.
In this PR we've changed the way how the labels are created and updated. Basically, counts are the separate shiny/html elements which have their own
id, which they are identified by.$choice ($filtered/$unfiltered)To update the counts without triggering reactive cycle we created two js handlers which change a bar and a label found using
id.Instead of
observeEvent(filtered_counts(), ...)we usedrenderUI(... filtered_counts())which serves as the observer for the visible item only!In the ChoicesFilterState we applied this to trigger change of the selection only when the picker is closed - closing pickerInput labels (counts ) are too reactive #167
You can find examples in #165 and one can use also
teal.gallery::launch_app.