[WEB-4976]chore: propel toast implementation (#7832)
* draft: implementation * chore: migrated toast from @plane/ui to propel package * chore: reverted unwanted changes * fix: lint errors * chore: added dismiss toast to propel toast * fix: build and lint errors * chore: code refactor --------- Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia@plane.so>
This commit is contained in:
parent
d38f4811b6
commit
3cbb60417c
200 changed files with 512 additions and 329 deletions
|
|
@ -17,9 +17,10 @@ import {
|
|||
// plane types
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { LayersIcon, ModuleStatusIcon } from "@plane/propel/icons";
|
||||
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
||||
import { ILinkDetails, IModule, ModuleLink } from "@plane/types";
|
||||
// plane ui
|
||||
import { Loader, CustomSelect, TOAST_TYPE, setToast, TextArea } from "@plane/ui";
|
||||
import { Loader, CustomSelect, TextArea } from "@plane/ui";
|
||||
// components
|
||||
// helpers
|
||||
import { getDate, renderFormattedPayloadDate } from "@plane/utils";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { useState, Fragment } from "react";
|
|||
import { Dialog, Transition } from "@headlessui/react";
|
||||
// ui
|
||||
import { Button } from "@plane/propel/button";
|
||||
import { TOAST_TYPE, setToast } from "@plane/ui";
|
||||
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
||||
// hooks
|
||||
import { useModule } from "@/hooks/store/use-module";
|
||||
import { useAppRouter } from "@/hooks/use-app-router";
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ import { useParams } from "next/navigation";
|
|||
// types
|
||||
import { MODULE_TRACKER_EVENTS, PROJECT_ERROR_MESSAGES } from "@plane/constants";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
||||
import type { IModule } from "@plane/types";
|
||||
// ui
|
||||
import { AlertModalCore, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
import { AlertModalCore } from "@plane/ui";
|
||||
// constants
|
||||
// helpers
|
||||
import { captureSuccess, captureError } from "@/helpers/event-tracker.helper";
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ import { FC, useEffect } from "react";
|
|||
import { Controller, useForm } from "react-hook-form";
|
||||
// plane types
|
||||
import { Button } from "@plane/propel/button";
|
||||
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
||||
import type { ILinkDetails, ModuleLink } from "@plane/types";
|
||||
// plane ui
|
||||
import { Input, ModalCore, setToast, TOAST_TYPE } from "@plane/ui";
|
||||
import { Input, ModalCore } from "@plane/ui";
|
||||
|
||||
type Props = {
|
||||
createLink: (formData: ModuleLink) => Promise<void>;
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ import { observer } from "mobx-react";
|
|||
import { Copy, Pencil, Trash2 } from "lucide-react";
|
||||
// plane types
|
||||
import { MODULE_TRACKER_ELEMENTS } from "@plane/constants";
|
||||
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
||||
import { Tooltip } from "@plane/propel/tooltip";
|
||||
import { ILinkDetails } from "@plane/types";
|
||||
// plane ui
|
||||
import { setToast, TOAST_TYPE } from "@plane/ui";
|
||||
import { getIconForLink, copyTextToClipboard, calculateTimeAgo } from "@plane/utils";
|
||||
// helpers
|
||||
//
|
||||
|
|
|
|||
|
|
@ -5,9 +5,10 @@ import { observer } from "mobx-react";
|
|||
import { useForm } from "react-hook-form";
|
||||
// types
|
||||
import { MODULE_TRACKER_EVENTS } from "@plane/constants";
|
||||
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
||||
import type { IModule } from "@plane/types";
|
||||
// ui
|
||||
import { EModalPosition, EModalWidth, ModalCore, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui";
|
||||
// components
|
||||
import { ModuleForm } from "@/components/modules";
|
||||
// constants
|
||||
|
|
|
|||
|
|
@ -17,9 +17,10 @@ import {
|
|||
} from "@plane/constants";
|
||||
import { useLocalStorage } from "@plane/hooks";
|
||||
import { LayersIcon } from "@plane/propel/icons";
|
||||
import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/propel/toast";
|
||||
import { Tooltip } from "@plane/propel/tooltip";
|
||||
import { IModule } from "@plane/types";
|
||||
import { Card, FavoriteStar, LinearProgressIndicator, TOAST_TYPE, setPromiseToast, setToast } from "@plane/ui";
|
||||
import { Card, FavoriteStar, LinearProgressIndicator } from "@plane/ui";
|
||||
import { getDate, renderFormattedPayloadDate, generateQueryParams } from "@plane/utils";
|
||||
// components
|
||||
import { DateRangeDropdown } from "@/components/dropdowns/date-range";
|
||||
|
|
|
|||
|
|
@ -16,10 +16,11 @@ import {
|
|||
} from "@plane/constants";
|
||||
import { useLocalStorage } from "@plane/hooks";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/propel/toast";
|
||||
import { Tooltip } from "@plane/propel/tooltip";
|
||||
import { IModule } from "@plane/types";
|
||||
// ui
|
||||
import { FavoriteStar, TOAST_TYPE, setPromiseToast, setToast } from "@plane/ui";
|
||||
import { FavoriteStar } from "@plane/ui";
|
||||
// components
|
||||
import { renderFormattedPayloadDate, getDate } from "@plane/utils";
|
||||
import { DateRangeDropdown } from "@/components/dropdowns/date-range";
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ import {
|
|||
import { useTranslation } from "@plane/i18n";
|
||||
// ui
|
||||
import { ArchiveIcon } from "@plane/propel/icons";
|
||||
import { ContextMenu, CustomMenu, TContextMenuItem, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
||||
import { ContextMenu, CustomMenu, TContextMenuItem } from "@plane/ui";
|
||||
import { copyUrlToClipboard, cn } from "@plane/utils";
|
||||
// components
|
||||
import { ArchiveModuleModal, CreateUpdateModuleModal, DeleteModuleModal } from "@/components/modules";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue