fix: Labels delete & reordering (#2729)
* fix: Labels reordering inconsistency * fix: Delete child labels * feat: multi-select while grouping labels * refactor: label sorting in mobx computed function * feat: drag & drop label grouping, un-grouping * chore: removed label select modal * fix: moving labels from project store to project label store * fix: typo changes and build tree function added * labels feature * disable dropping group into a group * fix build errors * fix more issues * chore: added combining state UI, fixed scroll issue for label groups * chore: group icon for label groups * fix: group cannot be dropped in another group --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com> Co-authored-by: rahulramesha <rahulramesham@gmail.com> Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
This commit is contained in:
parent
d933c73343
commit
63b6150b9c
62 changed files with 862 additions and 520 deletions
|
|
@ -12,7 +12,7 @@ import { Button, Input } from "@plane/ui";
|
|||
// icons
|
||||
import { ChevronDown } from "lucide-react";
|
||||
// types
|
||||
import type { IIssueLabels, IState } from "types";
|
||||
import type { IIssueLabel, IState } from "types";
|
||||
// constants
|
||||
import { LABEL_COLOR_OPTIONS, getRandomLabelColor } from "constants/label";
|
||||
import useToast from "hooks/use-toast";
|
||||
|
|
@ -22,7 +22,7 @@ type Props = {
|
|||
isOpen: boolean;
|
||||
projectId: string;
|
||||
handleClose: () => void;
|
||||
onSuccess?: (response: IIssueLabels) => void;
|
||||
onSuccess?: (response: IIssueLabel) => void;
|
||||
};
|
||||
|
||||
const defaultValues: Partial<IState> = {
|
||||
|
|
@ -47,7 +47,7 @@ export const CreateLabelModal: React.FC<Props> = observer((props) => {
|
|||
reset,
|
||||
setValue,
|
||||
setFocus,
|
||||
} = useForm<IIssueLabels>({
|
||||
} = useForm<IIssueLabel>({
|
||||
defaultValues,
|
||||
});
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ export const CreateLabelModal: React.FC<Props> = observer((props) => {
|
|||
|
||||
const { setToastAlert } = useToast();
|
||||
|
||||
const onSubmit = async (formData: IIssueLabels) => {
|
||||
const onSubmit = async (formData: IIssueLabel) => {
|
||||
if (!workspaceSlug) return;
|
||||
|
||||
await projectLabelStore
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue