From 92a077dce103bafb84a92944ed9126a42b1970cc Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Fri, 15 Mar 2024 17:28:45 +0530 Subject: [PATCH] [WEB-504] chore: command k and issue relation modal empty state (#3955) * chore: empty state asset updated * chore: empty state asset updated * chore: empty state config file updated * chore: notification empty state updated * chore: command-k, bulk delete and issue relation modal empty state updated * chore: code refactor * chore: code refactor --- .../command-palette/command-modal.tsx | 25 ++++-- .../core/modals/bulk-delete-issues-modal.tsx | 29 ++++--- .../modals/existing-issues-list-modal.tsx | 25 +++--- web/components/core/modals/index.ts | 1 + .../modals/issue-search-modal-empty-state.tsx | 36 ++++++++ web/components/empty-state/empty-state.tsx | 24 +++++- .../inbox/modals/select-duplicate.tsx | 27 +++--- .../issues/parent-issues-list-modal.tsx | 23 +++--- .../notifications/notification-popover.tsx | 41 +++++---- web/constants/empty-state.ts | 78 ++++++++++++++++-- .../empty-state/search/archive-dark.webp | Bin 0 -> 2292 bytes .../empty-state/search/archive-light.webp | Bin 0 -> 2434 bytes .../empty-state/search/comments-dark.webp | Bin 0 -> 2574 bytes .../empty-state/search/comments-light.webp | Bin 0 -> 2744 bytes web/public/empty-state/search/issue-dark.webp | Bin 0 -> 3118 bytes .../empty-state/search/issues-light.webp | Bin 0 -> 2924 bytes .../empty-state/search/notification-dark.webp | Bin 0 -> 2286 bytes .../search/notification-light.webp | Bin 0 -> 2524 bytes .../empty-state/search/search-dark.webp | Bin 0 -> 2330 bytes .../empty-state/search/search-light.webp | Bin 0 -> 2644 bytes .../empty-state/search/snooze-dark.webp | Bin 0 -> 2464 bytes .../empty-state/search/snooze-light.webp | Bin 0 -> 2790 bytes 22 files changed, 231 insertions(+), 78 deletions(-) create mode 100644 web/components/core/modals/issue-search-modal-empty-state.tsx create mode 100644 web/public/empty-state/search/archive-dark.webp create mode 100644 web/public/empty-state/search/archive-light.webp create mode 100644 web/public/empty-state/search/comments-dark.webp create mode 100644 web/public/empty-state/search/comments-light.webp create mode 100644 web/public/empty-state/search/issue-dark.webp create mode 100644 web/public/empty-state/search/issues-light.webp create mode 100644 web/public/empty-state/search/notification-dark.webp create mode 100644 web/public/empty-state/search/notification-light.webp create mode 100644 web/public/empty-state/search/search-dark.webp create mode 100644 web/public/empty-state/search/search-light.webp create mode 100644 web/public/empty-state/search/snooze-dark.webp create mode 100644 web/public/empty-state/search/snooze-light.webp diff --git a/web/components/command-palette/command-modal.tsx b/web/components/command-palette/command-modal.tsx index cffd3ff11..60c4fcc04 100644 --- a/web/components/command-palette/command-modal.tsx +++ b/web/components/command-palette/command-modal.tsx @@ -4,9 +4,19 @@ import { observer } from "mobx-react-lite"; import { useRouter } from "next/router"; import useSWR from "swr"; import { Dialog, Transition } from "@headlessui/react"; +// icons import { FolderPlus, Search, Settings } from "lucide-react"; // hooks +import { useApplication, useEventTracker, useProject } from "hooks/store"; +import { usePlatformOS } from "hooks/use-platform-os"; +import useDebounce from "hooks/use-debounce"; +// services +import { IssueService } from "services/issue"; +import { WorkspaceService } from "services/workspace.service"; +// ui import { LayersIcon, Loader, ToggleSwitch, Tooltip } from "@plane/ui"; +// components +import { EmptyState } from "components/empty-state"; import { CommandPaletteThemeActions, ChangeIssueAssignee, @@ -18,18 +28,13 @@ import { CommandPaletteWorkspaceSettingsActions, CommandPaletteSearchResults, } from "components/command-palette"; -import { ISSUE_DETAILS } from "constants/fetch-keys"; -import { useApplication, useEventTracker, useProject } from "hooks/store"; -import { usePlatformOS } from "hooks/use-platform-os"; -// services -import useDebounce from "hooks/use-debounce"; -import { IssueService } from "services/issue"; -import { WorkspaceService } from "services/workspace.service"; // types import { IWorkspaceSearchResults } from "@plane/types"; // fetch-keys +// constants +import { EmptyStateType } from "constants/empty-state"; +import { ISSUE_DETAILS } from "constants/fetch-keys"; -// services const workspaceService = new WorkspaceService(); const issueService = new IssueService(); @@ -244,7 +249,9 @@ export const CommandModal: React.FC = observer(() => { )} {!isLoading && resultsCount === 0 && searchTerm !== "" && debouncedSearchTerm !== "" && ( -
C. -
C. -
{description}
+ > + ) : ( +C. -
C. -
vOq=fIkjO@Du@`Rtq4A)BYKh~u<pHP$U(!fIOa7K;8%bHnpU9+*b(*btVg6Q1U
z9i?YJ)txT5LU_vP-23QrJ(0HiJ5XWIP6GB?L}^=$McA#gKz|7MSpmf&&}2esK
z!+2fWO8Gu)S|U}zam