From 569a6c3383f89b706c15b67aa995af2c31b86518 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Mon, 2 Oct 2023 12:41:40 +0530 Subject: [PATCH] dev: applied filters list implementation using MobX (#2325) * dev: applied filters list UI * fix: filter item height * chore: remove unnecessary classes * fix: params generator --- web/components/core/views/all-views.tsx | 5 +- web/components/issue-layouts/root.tsx | 8 +- .../calendar/dropdowns/months-dropdown.tsx | 4 +- .../issue-layouts/calendar/issue-blocks.tsx | 6 +- .../filters/applied-filters/date.tsx | 54 +++++++ .../filters/applied-filters/filters-list.tsx | 141 ++++++++++++++++++ .../filters/applied-filters/index.ts | 7 + .../filters/applied-filters/label.tsx | 45 ++++++ .../filters/applied-filters/members.tsx | 42 ++++++ .../filters/applied-filters/priority.tsx | 47 ++++++ .../filters/applied-filters/state-group.tsx | 33 ++++ .../filters/applied-filters/state.tsx | 45 ++++++ .../display-filters-selection.tsx | 0 .../display-filters/display-properties.tsx | 0 .../header/display-filters/extra-options.tsx | 0 .../header/display-filters/group-by.tsx | 0 .../header/display-filters/index.ts | 0 .../header/display-filters/issue-type.tsx | 0 .../header/display-filters/order-by.tsx | 0 .../header/display-filters/sub-group-by.tsx | 0 .../header/filters/assignee.tsx} | 0 .../header/filters/created-by.tsx | 0 .../header/filters/filters-selection.tsx | 2 +- .../{ => filters}/header/filters/index.ts | 2 +- .../{ => filters}/header/filters/labels.tsx | 0 .../{ => filters}/header/filters/priority.tsx | 0 .../header/filters/start-date.tsx | 0 .../header/filters/state-group.tsx | 0 .../{ => filters}/header/filters/state.tsx | 0 .../header/filters/target-date.tsx | 0 .../{ => filters}/header/helpers/dropdown.tsx | 0 .../header/helpers/filter-header.tsx | 0 .../header/helpers/filter-option.tsx | 0 .../{ => filters}/header/helpers/index.ts | 0 .../{ => filters}/header/index.ts | 0 .../{ => filters}/header/layout-selection.tsx | 0 .../issues/issue-layouts/filters/index.ts | 2 + web/components/issues/issue-layouts/index.ts | 2 +- web/store/issue_filters.ts | 22 +-- 39 files changed, 434 insertions(+), 33 deletions(-) create mode 100644 web/components/issues/issue-layouts/filters/applied-filters/date.tsx create mode 100644 web/components/issues/issue-layouts/filters/applied-filters/filters-list.tsx create mode 100644 web/components/issues/issue-layouts/filters/applied-filters/index.ts create mode 100644 web/components/issues/issue-layouts/filters/applied-filters/label.tsx create mode 100644 web/components/issues/issue-layouts/filters/applied-filters/members.tsx create mode 100644 web/components/issues/issue-layouts/filters/applied-filters/priority.tsx create mode 100644 web/components/issues/issue-layouts/filters/applied-filters/state-group.tsx create mode 100644 web/components/issues/issue-layouts/filters/applied-filters/state.tsx rename web/components/issues/issue-layouts/{ => filters}/header/display-filters/display-filters-selection.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/display-filters/display-properties.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/display-filters/extra-options.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/display-filters/group-by.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/display-filters/index.ts (100%) rename web/components/issues/issue-layouts/{ => filters}/header/display-filters/issue-type.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/display-filters/order-by.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/display-filters/sub-group-by.tsx (100%) rename web/components/issues/issue-layouts/{header/filters/assignees.tsx => filters/header/filters/assignee.tsx} (100%) rename web/components/issues/issue-layouts/{ => filters}/header/filters/created-by.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/filters/filters-selection.tsx (99%) rename web/components/issues/issue-layouts/{ => filters}/header/filters/index.ts (89%) rename web/components/issues/issue-layouts/{ => filters}/header/filters/labels.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/filters/priority.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/filters/start-date.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/filters/state-group.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/filters/state.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/filters/target-date.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/helpers/dropdown.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/helpers/filter-header.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/helpers/filter-option.tsx (100%) rename web/components/issues/issue-layouts/{ => filters}/header/helpers/index.ts (100%) rename web/components/issues/issue-layouts/{ => filters}/header/index.ts (100%) rename web/components/issues/issue-layouts/{ => filters}/header/layout-selection.tsx (100%) create mode 100644 web/components/issues/issue-layouts/filters/index.ts diff --git a/web/components/core/views/all-views.tsx b/web/components/core/views/all-views.tsx index e8478e71a..c5fcc7300 100644 --- a/web/components/core/views/all-views.tsx +++ b/web/components/core/views/all-views.tsx @@ -6,7 +6,7 @@ import useSWR from "swr"; // mobx store import { useMobxStore } from "lib/mobx/store-provider"; // components -import { CalendarLayout, GanttLayout, KanBanLayout, SpreadsheetLayout } from "components/issues"; +import { AppliedFiltersList, CalendarLayout, GanttLayout, KanBanLayout, SpreadsheetLayout } from "components/issues"; export const AllViews: React.FC = observer(() => { const router = useRouter(); @@ -34,7 +34,8 @@ export const AllViews: React.FC = observer(() => { const activeLayout = issueFilterStore.userDisplayFilters.layout; return ( -