-
-
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
280 locked filter #297
280 locked filter #297
Conversation
Hey @chlebowa this is really well done and the description of the PR is extremely detailed, hence it is easier for someone to take over. I think I will be able to handle that today. We will only need to decide on the final name (again) and the icon but I guess we can do that on the next refinement |
…er_panel_refactor@main
…terStates$clear_filter_states
Hey @chlebowa I tried to move forward with
I think the needed code is there but I'd like your opinion on the logger code. Isn't that too much logging right now? |
It might be a bit too much. I suggest three three log entries: "removing" when the method starts, "aborted" if state is locked, and "removed" when state is removed. Have a look at |
Code Coverage Summary
Diff against main
Results for commit: a90f003 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com> Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com> Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com> Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
…//github.com/insightsengineering/teal.slice into 280_locked_filter@filter_panel_refactor@main
…o FALSE when filter changes to a locked FilterState
I reverted back 66f86fd |
@gogonzo @chlebowa there are two aspects left on this PR
As @gogonzo showed today on #300 we will remove disabled completely so I don't think we should invest energy in troubleshooting this and we should resolve this on #300 |
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.
Looks good. Please revert changes in GH action
video1696221495.mp4@gogonzo those GH actions changes that you see is the same issue that @kartikeyakirar had yesterday on other PR. Check out the video above to see how I refresh the PR and make an updated snapshot. |
…er_panel_refactor@main Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
Closes #280
Adds a
locked
property toFilterState
class. A locked filter state cannot be disabled or removed but can still be modified.locked
andfixed
properties can be set independently of one another.Changes to
FilterState
class:locked
argument is added to constructors and wrappers; the argument receives a logical flag and defaults toFALSE
locked
is added toFilterState
to store the property$get_state
is modified to return thelocked
value in addition to all other filter state properties$set state
is modified to interrupt an attempt at disabling a filter state that is locked$ui
is modified to only display the disable and remove buttons ifprivate$locked
isFALSE
$ui
is modified to display an additional icon ifprivate$locked
isTRUE
Analogous changes are made to
FilterStateExpr
class.The
locked
argument is also added tofilter_var
.Furthermore,
FilteredData$filter_panel_disable
andFilteredData$filter_panel_disable
are modified so that locked filter states ignore the global disable button. To this end, disabling the div containing all filter cards ("filter_active_vars_contents") is removed. Filter cards are now disabled solely by setting their state withdisabled = TRUE
(which locked states ignore).Remaining actions:
FilterStates$remove_filter_state
andFilterStates$clear_filter_states
so that locked filter states are omitted.FilteredData$filter_panel_enable/disable
has not been removed but commented out and marked with "TODO".lock
icon has been transferred from thefixed
property to thelocked
property. A fixed state thus needs a new icon.burst
is used as a placeholder but a suitable replacement must be found.