diff --git a/.vscode/settings.json b/.vscode/settings.json index 5386dcb55..e93c83905 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,6 +11,7 @@ "digma", "digmathon", "digmo", + "Hotspot", "leaderboard", "undismiss", "zustand" diff --git a/package.json b/package.json index e27587cf8..4f42e97c6 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "build:prod": "webpack --config webpack.prod.ts", "build:prod:web": "webpack --config webpack.prod.ts --env platform=Web", "precommit": "lint-staged", - "prepare": "husky" + "prepare": "husky", + "start": "npm run storybook" }, "lint-staged": { "*.{js,ts,tsx}": [ diff --git a/src/components/Assets/AssetsFilter/index.tsx b/src/components/Assets/AssetsFilter/index.tsx index 07fb9c1f4..5f4f658a8 100644 --- a/src/components/Assets/AssetsFilter/index.tsx +++ b/src/components/Assets/AssetsFilter/index.tsx @@ -8,11 +8,9 @@ import { isNull } from "../../../typeGuards/isNull"; import { isUndefined } from "../../../typeGuards/isUndefined"; import { InsightType } from "../../../types"; import { sendTrackingEvent } from "../../../utils/actions/sendTrackingEvent"; +import { sendUserActionTrackingEvent } from "../../../utils/actions/sendUserActionTrackingEvent"; import { getInsightTypeInfo } from "../../../utils/getInsightTypeInfo"; -import { FilterButton } from "../../common/FilterButton"; -import { NewButton } from "../../common/NewButton"; -import { NewPopover } from "../../common/NewPopover"; -import { Select } from "../../common/Select"; +import { FilterPopup } from "../../common/FilterPopup"; import { WrenchIcon } from "../../common/icons/12px/WrenchIcon"; import { EndpointIcon } from "../../common/icons/EndpointIcon"; import { SparkleIcon } from "../../common/icons/SparkleIcon"; @@ -20,7 +18,6 @@ import { IconProps } from "../../common/icons/types"; import { AssetScopeOption } from "../AssetsViewScopeConfiguration/types"; import { actions } from "../actions"; import { trackingEvents } from "../tracking"; -import * as s from "./styles"; import { AssetFilterCategory, AssetFilterQuery, @@ -29,6 +26,8 @@ import { GetAssetFiltersDataPayload } from "./types"; +import * as s from "./styles"; + const PERSISTENCE_KEY = "assetsFilters"; const getData = ({ @@ -53,7 +52,7 @@ const getData = ({ insights, directOnly: Boolean(assetScopeOption?.isDirect), scopedSpanCodeObjectId: assetScopeOption?.scopedSpanCodeObjectId, - ...(searchQuery.length > 0 ? { displayName: searchQuery } : {}) + ...(searchQuery?.length > 0 ? { displayName: searchQuery } : {}) } } }); @@ -76,7 +75,7 @@ const renderFilterCategory = ( })) ?? []; return ( - 0 ? "Services" : "All"} - multiselect={true} - icon={(props: IconProps) => ( - - - - )} - disabled={issueTypesFilterOptions?.length === 0} - /> - + const filterComponents = [ + { + title: "Issues", + component: ( + 0 ? "Issues" : "All"} + multiselect={true} + icon={(props: IconProps) => ( + + + )} - Issues - handleToggleFilterChange(value, "criticality")} - placeholder={criticalityFilterPlaceholder} - icon={(props: IconProps) => ( - - - - )} - showSelectedState={isCriticalOnly} - /> - Read/Unread -