From 9831418a11f4e26bc4720f716713b9eebe4f40a4 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Mon, 25 Sep 2023 19:17:40 +0530 Subject: [PATCH] chore: filters dropdown (#2260) * chore: project issues topbar * style: theming and minor UI fixes * refactor: file structure * chore: layout wise authorization added * style: filter dropdowns * chore: add fetch keys * feat: search option for filters * fix: sticky headers * chore: sub_group_by section added --- .../display-filters-selection.tsx | 85 ++++--- .../display-filters/display-properties.tsx | 6 +- .../display-filters/extra-options.tsx | 12 +- .../display-filters/group-by.tsx | 11 +- .../issue-layouts/display-filters/index.ts | 1 + .../display-filters/issue-type.tsx | 9 +- .../display-filters/order-by.tsx | 11 +- .../display-filters/sub-group-by.tsx | 64 +++++ .../issue-layouts/filters/assignees.tsx | 65 +++-- .../issue-layouts/filters/created-by.tsx | 55 +++-- .../filters/filters-selection.tsx | 230 ++++++++++++++++++ web/components/issue-layouts/filters/index.ts | 2 +- .../issue-layouts/filters/labels.tsx | 62 +++-- .../issue-layouts/filters/priority.tsx | 38 ++- .../issue-layouts/filters/start-date.tsx | 14 +- .../issue-layouts/filters/state-group.tsx | 45 ++-- .../issue-layouts/filters/state.tsx | 61 +++-- .../issue-layouts/filters/target-date.tsx | 12 +- .../issue-layouts/helpers/dropdown.tsx | 4 +- .../issue-layouts/helpers/filter-header.tsx | 2 +- .../issue-layouts/helpers/filter-option.tsx | 2 +- .../issue-layouts/layout-selection.tsx | 32 +-- web/components/issue-layouts/root.tsx | 16 +- web/constants/fetch-keys.ts | 121 +++------ web/constants/issue.ts | 140 +++++++++-- web/helpers/issue.helper.ts | 2 + .../projects/[projectId]/issues/index.tsx | 9 +- web/store/issue_filters.ts | 14 +- web/types/view-props.d.ts | 2 + 29 files changed, 786 insertions(+), 341 deletions(-) create mode 100644 web/components/issue-layouts/display-filters/sub-group-by.tsx create mode 100644 web/components/issue-layouts/filters/filters-selection.tsx diff --git a/web/components/issue-layouts/display-filters/display-filters-selection.tsx b/web/components/issue-layouts/display-filters/display-filters-selection.tsx index 64d6ad0df..01394548d 100644 --- a/web/components/issue-layouts/display-filters/display-filters-selection.tsx +++ b/web/components/issue-layouts/display-filters/display-filters-selection.tsx @@ -10,58 +10,65 @@ import { FilterGroupBy, FilterIssueType, FilterOrderBy, + FilterSubGroupBy, } from "components/issue-layouts"; // helpers -import { issueFilterVisibilityData } from "helpers/issue.helper"; +import { ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "constants/issue"; export const DisplayFiltersSelection = observer(() => { const { issueFilter: issueFilterStore } = useMobxStore(); const isDisplayFilterEnabled = (displayFilter: string) => - issueFilterVisibilityData.issues.display_filters[issueFilterStore.userDisplayFilters.layout ?? "list"].includes( - displayFilter - ); + ISSUE_DISPLAY_FILTERS_BY_LAYOUT.issues.display_filters[ + issueFilterStore.userDisplayFilters.layout ?? "list" + ].includes(displayFilter); return ( -
No matches found
+ ) + ) : ( +No matches found
+ ) + ) : ( +No matches found
+ ) + ) : ( +No matches found
+ )}No matches found
+ )}No matches found
+ ) + ) : ( +