Skip to content

Commit a4450d3

Browse files
chore: tab indices constant moved to plane package (#6464)
1 parent 7f19caf commit a4450d3

File tree

22 files changed

+59
-37
lines changed

22 files changed

+59
-37
lines changed

packages/constants/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export * from "./issue";
1111
export * from "./metadata";
1212
export * from "./state";
1313
export * from "./swr";
14+
export * from "./tab-indices";
1415
export * from "./user";
1516
export * from "./workspace";
1617
export * from "./stickies";
Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,14 @@ export const PROJECT_CREATE_TAB_INDICES = [
5454
"logo_props",
5555
];
5656

57-
export const PROJECT_CYCLE_TAB_INDICES = ["name", "description", "date_range", "cancel", "submit", "project_id"];
57+
export const PROJECT_CYCLE_TAB_INDICES = [
58+
"name",
59+
"description",
60+
"date_range",
61+
"cancel",
62+
"submit",
63+
"project_id",
64+
];
5865

5966
export const PROJECT_MODULE_TAB_INDICES = [
6067
"name",
@@ -67,9 +74,21 @@ export const PROJECT_MODULE_TAB_INDICES = [
6774
"submit",
6875
];
6976

70-
export const PROJECT_VIEW_TAB_INDICES = ["name", "description", "filters", "cancel", "submit"];
77+
export const PROJECT_VIEW_TAB_INDICES = [
78+
"name",
79+
"description",
80+
"filters",
81+
"cancel",
82+
"submit",
83+
];
7184

72-
export const PROJECT_PAGE_TAB_INDICES = ["name", "public", "private", "cancel", "submit"];
85+
export const PROJECT_PAGE_TAB_INDICES = [
86+
"name",
87+
"public",
88+
"private",
89+
"cancel",
90+
"submit",
91+
];
7392

7493
export enum ETabIndices {
7594
ISSUE_FORM = "issue-form",

web/ce/components/projects/create/attributes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use client";
22
import { FC } from "react";
33
import { Controller, useFormContext } from "react-hook-form";
4+
import { ETabIndices } from "@plane/constants";
45
import { useTranslation } from "@plane/i18n";
56
import { IProject } from "@plane/types";
67
// ui
@@ -9,7 +10,6 @@ import { CustomSelect } from "@plane/ui";
910
import { MemberDropdown } from "@/components/dropdowns";
1011
// constants
1112
import { NETWORK_CHOICES } from "@/constants/project";
12-
import { ETabIndices } from "@/constants/tab-indices";
1313
// helpers
1414
import { getTabIndex } from "@/helpers/tab-indices.helper";
1515

web/core/components/cycles/form.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
import { useEffect } from "react";
44
import { Controller, useForm } from "react-hook-form";
5+
// plane imports
6+
import { ETabIndices } from "@plane/constants";
57
// types
68
import { ICycle } from "@plane/types";
79
// ui
810
import { Button, Input, TextArea } from "@plane/ui";
911
// components
1012
import { DateRangeDropdown, ProjectDropdown } from "@/components/dropdowns";
1113
// constants
12-
import { ETabIndices } from "@/constants/tab-indices";
1314
// helpers
1415
import { getDate, renderFormattedPayloadDate } from "@/helpers/date-time.helper";
1516
import { shouldRenderProject } from "@/helpers/project.helper";

web/core/components/inbox/modals/create-modal/create-root.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import { FC, FormEvent, useCallback, useEffect, useRef, useState } from "react";
44
import { observer } from "mobx-react";
55
import { usePathname } from "next/navigation";
6+
// plane imports
7+
import { ETabIndices } from "@plane/constants";
68
// editor
79
import { EditorRefApi } from "@plane/editor";
810
// types
@@ -12,7 +14,6 @@ import { Button, ToggleSwitch, TOAST_TYPE, setToast } from "@plane/ui";
1214
import { InboxIssueTitle, InboxIssueDescription, InboxIssueProperties } from "@/components/inbox/modals/create-modal";
1315
// constants
1416
import { ISSUE_CREATED } from "@/constants/event-tracker";
15-
import { ETabIndices } from "@/constants/tab-indices";
1617
// helpers
1718
import { renderFormattedPayloadDate } from "@/helpers/date-time.helper";
1819
import { getTabIndex } from "@/helpers/tab-indices.helper";

web/core/components/inbox/modals/create-modal/issue-description.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import { FC, RefObject } from "react";
44
import { observer } from "mobx-react";
5+
// plane imports
6+
import { ETabIndices } from "@plane/constants";
57
// editor
68
import { EditorRefApi } from "@plane/editor";
79
// types
@@ -11,8 +13,6 @@ import { EFileAssetType } from "@plane/types/src/enums";
1113
import { Loader } from "@plane/ui";
1214
// components
1315
import { RichTextEditor } from "@/components/editor/rich-text-editor/rich-text-editor";
14-
// constants
15-
import { ETabIndices } from "@/constants/tab-indices";
1616
// helpers
1717
import { getDescriptionPlaceholder } from "@/helpers/issue.helper";
1818
import { getTabIndex } from "@/helpers/tab-indices.helper";

web/core/components/inbox/modals/create-modal/issue-properties.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { FC, useState } from "react";
22
import { observer } from "mobx-react";
33
import { LayoutPanelTop } from "lucide-react";
4+
// plane imports
5+
import { ETabIndices } from "@plane/constants";
46
import { ISearchIssueResponse, TIssue } from "@plane/types";
57
import { CustomMenu } from "@plane/ui";
68
// components
@@ -15,8 +17,6 @@ import {
1517
} from "@/components/dropdowns";
1618
import { ParentIssuesListModal } from "@/components/issues";
1719
import { IssueLabelSelect } from "@/components/issues/select";
18-
// constants
19-
import { ETabIndices } from "@/constants/tab-indices";
2020
// helpers
2121
import { renderFormattedPayloadDate, getDate } from "@/helpers/date-time.helper";
2222
import { getTabIndex } from "@/helpers/tab-indices.helper";

web/core/components/inbox/modals/create-modal/issue-title.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import { FC } from "react";
44
import { observer } from "mobx-react";
5+
// plane imports
6+
import { ETabIndices } from "@plane/constants";
57
import { TIssue } from "@plane/types";
68
import { Input } from "@plane/ui";
7-
// constants
8-
import { ETabIndices } from "@/constants/tab-indices";
99
// helpers
1010
import { getTabIndex } from "@/helpers/tab-indices.helper";
1111
// hooks

web/core/components/issues/issue-modal/components/default-properties.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import React, { useState } from "react";
44
import { observer } from "mobx-react";
55
import { Control, Controller } from "react-hook-form";
66
import { LayoutPanelTop } from "lucide-react";
7+
// plane imports
8+
import { ETabIndices } from "@plane/constants";
79
import { useTranslation } from "@plane/i18n";
810
// types
911
import { ISearchIssueResponse, TIssue } from "@plane/types";
@@ -21,8 +23,6 @@ import {
2123
} from "@/components/dropdowns";
2224
import { ParentIssuesListModal } from "@/components/issues";
2325
import { IssueLabelSelect } from "@/components/issues/select";
24-
// constants
25-
import { ETabIndices } from "@/constants/tab-indices";
2626
// helpers
2727
import { getDate, renderFormattedPayloadDate } from "@/helpers/date-time.helper";
2828
import { getTabIndex } from "@/helpers/tab-indices.helper";

web/core/components/issues/issue-modal/components/description-editor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import React, { useEffect, useState } from "react";
44
import { observer } from "mobx-react";
55
import { Control, Controller } from "react-hook-form";
66
import { Sparkle } from "lucide-react";
7+
// plane imports
8+
import { ETabIndices } from "@plane/constants";
79
// editor
810
import { EditorRefApi } from "@plane/editor";
911
// types
@@ -14,8 +16,6 @@ import { Loader, setToast, TOAST_TYPE } from "@plane/ui";
1416
// components
1517
import { GptAssistantPopover } from "@/components/core";
1618
import { RichTextEditor } from "@/components/editor";
17-
// constants
18-
import { ETabIndices } from "@/constants/tab-indices";
1919
// helpers
2020
import { getDescriptionPlaceholder } from "@/helpers/issue.helper";
2121
import { getTabIndex } from "@/helpers/tab-indices.helper";

0 commit comments

Comments
 (0)