-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[2/k][ui] Replace compute kind filters with kind filters #24160
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @benpankow and the rest of your teammates on Graphite |
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit 0e0981d. |
8dcf5cd
to
6e6b2eb
Compare
aa198f9
to
05dc5fe
Compare
6e6b2eb
to
5d3c50a
Compare
05dc5fe
to
37e8e7a
Compare
dc2569d
to
84f0c61
Compare
|
||
export function useAssetTagsForAssets( | ||
assets: {definition?: {tags?: DefinitionTag[] | null} | null}[], | ||
): DefinitionTag[] { | ||
return useMemo( | ||
() => | ||
Array.from( | ||
new Set( | ||
assets | ||
.flatMap((a) => a.definition?.tags?.map((tag) => JSON.stringify(tag)) ?? []) | ||
.filter((o) => o), | ||
), | ||
) | ||
.map((jsonTag) => buildDefinitionTag(JSON.parse(jsonTag))) | ||
.sort((a, b) => | ||
// Sort by key then by value | ||
a.key.localeCompare(b.key) === 0 | ||
? a.value.localeCompare(b.value) | ||
: a.key.localeCompare(b.key), | ||
), | ||
[assets], | ||
); | ||
} |
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 don't see any changes here?
@@ -152,7 +152,6 @@ export function useAssetCatalogFiltering< | |||
[ | |||
['owners', filters.owners, allAssetOwners] as const, | |||
['tags', filters.tags, tags] as const, | |||
['kinds', filters.kinds, allKinds] as const, |
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.
why did we remove this?
599c205
to
f803e74
Compare
f803e74
to
0e0981d
Compare
Summary
Re-implementation of #23805 which is slightly lighter weight (but still touches a lot of surface area). Substitutes in the notion of a generic kind filter rather than specifically compute kind.
Test Plan
Existing unit tests, local dagit.
Changelog
NOCHANGELOG