[dashboard filter scope] force show filter_box as unchecked#8587
Merged
graceguo-supercat merged 1 commit intoapache:feature--dashboard-scoped-filterfrom Nov 15, 2019
Conversation
eb7fdd5 to
48f7d46
Compare
Codecov Report
@@ Coverage Diff @@
## feature--dashboard-scoped-filter #8587 +/- ##
====================================================================
- Coverage 65.99% 65.97% -0.02%
====================================================================
Files 474 474
Lines 23193 23200 +7
Branches 2484 2487 +3
====================================================================
Hits 15307 15307
- Misses 7728 7735 +7
Partials 158 158
Continue to review full report at Codecov.
|
graceguo-supercat
pushed a commit
that referenced
this pull request
Nov 18, 2019
* [WIP][dashboard scoped filter] part 1: scope selector modal (#8557) * filter scope selector modal * add single-field-edit in multi-edit mode switch * fix code review comments (round 1) * refactory after design review * fix a few props initial value * [WIP][dashboard scoped filter] part 2: add algorithm to convert checked ids to scope object (#8564) * convert ids to scope object * use lodash helpers to make code readable * [WIP][dashboard scoped filter] part 3: merge filter scope settings into dashboard redux state (#8522) * merge filter scope settings into dashboard redux state * fix/add unit tests * minor bug fixes * fix save filter Scopes behavior * resolve review comments * fix save filter scope settings * minor comments * [dashboard scoped filter] Improve scrollbar inside modal (#8553) * improve scroll inside modal * make left pane and right pane scroll separately * fix review comments * force show filter_box as unchecked (#8587)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CATEGORY
Choose one
SUMMARY
We do not apply filter on filter_box itself, so in the scope selector modal, the filter_box's checkbox is disabled. But when user clicks on tab or other parent level node's checkbox, react-checkbox-tree framework still set the value for disabled nodes. So sometimes this will cause confusing. For example: in the UI no chart is selected but the root show half-checked:

This PR will add an extra logic that enforce filter_box's state is unchecked, but still show as disabled. This is still not perfect, because when user checked parent's checkbox, they are expected to see all children nodes are also checked. In this case, filter_box's state is still unchecked.
There is a proposal that to compare all the nodes under the parent, and ignore the filter_box's state. The data structure for all nodes state are in the tree structure. In order to igore the filter_box's state, I need to have a filter_box chartId, then find its parent, and find other siblings in the tree. This computation is not cheap, and will be triggered very frequent.
Given the performance impact is big and UI in-consistency is small, I propose this cheaper solution.
TEST PLAN
manual test.
ADDITIONAL INFORMATION
REVIEWERS
@etr2460 @kristw