Add tags and versions to ResourceList#24
Merged
Conversation
added 12 commits
July 30, 2020 20:11
The dashboard outputted a warning because we were throwing a string rather than an Error type. We wrap it in a TypeError.
Model Features can be versioned, this allows versions to be searched and selected via the UI.
Every resource can include an arbritrary amount of tags. These tags can be used to search and filter resources.
This slice keeps track of which tags are active. The tag filters are kept separate per resource type currently.
The copy function is used to make a mutable copy of the resources since MaterialTable doesn't play well with frozen objects. It was referring to resources directly rather than the res parameter which would fail when resources was an empty array.
There are situations where the outer array isn't frozen but one of the inner objects is which breaks MaterialTable. For now, its easier to just always copy the resources to guarantee mutability.
When tags are clicked, the rows are filtered. Tag filters are scoped to an individual resource page and are turned off by unchecking them.
TagList would fail if ActiveTags wasn't provided since it would always check if a tag is active via the object. This fixes that.
Verify that TagList renders correctly, highlights active tags, and calls toggleTag onClick.
We need to verify that the number of matched tags equals the number of total selected tags, otherwise, it'll retain partial matches.
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.
No description provided.