Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/components/Insights/Issues/IssuesFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { NewPopover } from "../../../common/NewPopover";
import { EyeIcon } from "../../../common/icons/12px/EyeIcon";
import { FourPointedStarIcon } from "../../../common/icons/12px/FourPointedStarIcon";
import { WrenchIcon } from "../../../common/icons/12px/WrenchIcon";
import { CrossIcon } from "../../../common/icons/16px/CrossIcon";
import { WarningTriangleIcon } from "../../../common/icons/WarningTriangleIcon";
import { IconProps } from "../../../common/icons/types";
import { Select } from "../../../common/v3/Select";
Expand Down Expand Up @@ -95,6 +96,11 @@ export const IssuesFilter = () => {
setFilteredServices(newFilteredServices);
};

const handleCloseButtonClick = () => {
sendUserActionTrackingEvent(trackingEvents.CLOSE_FILTER_DIALOG_CLICKED);
setIsOpen(false);
};

const handleToggleFilterChange = (
value: string | string[],
filterType: InsightFilterType
Expand Down Expand Up @@ -173,7 +179,12 @@ export const IssuesFilter = () => {
width={"100%"}
content={
<s.Container>
<s.Header>Filters</s.Header>
<s.Header>
Filters
<s.CloseButton onClick={handleCloseButtonClick}>
<CrossIcon color={"currentColor"} size={16} />
</s.CloseButton>
</s.Header>
<s.FilterCategoryName>Issues</s.FilterCategoryName>
<Select
key={"issues"}
Expand Down
10 changes: 10 additions & 0 deletions src/components/Insights/Issues/IssuesFilter/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const Header = styled.div`
padding: 0 4px;
display: flex;
align-items: center;
justify-content: space-between;
${bodyBoldTypography}
`;

Expand Down Expand Up @@ -75,3 +76,12 @@ export const InsightIconContainer = styled.div`
display: flex;
color: ${({ theme }) => theme.colors.v3.icon.tertiary};
`;

export const CloseButton = styled.button`
padding: 0;
cursor: pointer;
background: none;
border: none;
height: 14px;
color: inherit;
`;
3 changes: 2 additions & 1 deletion src/components/Insights/Issues/IssuesFilter/tracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export const trackingEvents = addPrefix(
TRACKING_PREFIX,
{
FILTER_OPTION_SELECTED: "filter option selected",
CLEAR_ALL_FILTERS_BUTTON_CLICKED: "clear all filters button clicked"
CLEAR_ALL_FILTERS_BUTTON_CLICKED: "clear all filters button clicked",
CLOSE_FILTER_DIALOG_CLICKED: "close filter dialog clicked"
},
" "
);
2 changes: 1 addition & 1 deletion src/components/common/v3/Select/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const OptionList = styled.ul`
export const OptionListItem = styled.li<OptionListItemProps>`
display: flex;
gap: 8px;
height: 28px;
max-height: 28px;
align-self: stretch;
align-items: center;
padding: 5px 8px;
Expand Down