This repository was archived by the owner on Mar 7, 2018. It is now read-only.
Conversation
erikschlegel
approved these changes
Sep 14, 2017
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Scenario overview
Opening the dashboard: default filters are shown in chips
Selecting a source in the top-sources chart: the selection is reflected in the chips
Clearing the source filter via clicking on the X button on the chip: the removal is reflected in the charts
Selecting two filters (source and pipeline) is also reflected in the chips
It's possible to just clear one filter and leave the other one intact
Implementation notes
The screenshots above show a UI option where we always show the chips to make it explicit what the default value is for each filter. In 2aae159 I made a change to only show chips for non-default valued filters (so we wouldn't show the chip for "Source: all"). Both options are possible, just gotta make a call on which one we prefer. Here's a screenshot without the default-valued filters:
It's pretty easy to add or remove filter chips. Just let me know exactly what you'd like to control via the chips. I didn't add a filter for
placeidbecause it's not actually part of the synced data. I didn't add a filter formaintopicortermFiltersbecause it would be highly redundant with the component just below:Unfortunately in the CSS one
!importantis necessary given that the MaterialUI chips set a bunch of styles on the elements instead of via classes... still better to have this one!importantas opposed to having to put just a single CSS rule into the Javascript and therewith splitting the styling information over multiple files.