fix: issue description placeholder (#4312)
This commit is contained in:
parent
87a606446f
commit
4f4f1d92e8
9 changed files with 28 additions and 30 deletions
|
|
@ -1,13 +1,6 @@
|
|||
import differenceInCalendarDays from "date-fns/differenceInCalendarDays";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
// helpers
|
||||
import { getDate } from "@/helpers/date-time.helper";
|
||||
import { orderArrayBy } from "@/helpers/array.helper";
|
||||
// types
|
||||
import { IGanttBlock } from "@/components/gantt-chart";
|
||||
// constants
|
||||
import { ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@/constants/issue";
|
||||
import { STATE_GROUPS } from "@/constants/state";
|
||||
import {
|
||||
TIssue,
|
||||
TIssueGroupByOptions,
|
||||
|
|
@ -16,6 +9,13 @@ import {
|
|||
TIssueParams,
|
||||
TStateGroups,
|
||||
} from "@plane/types";
|
||||
import { IGanttBlock } from "@/components/gantt-chart";
|
||||
// constants
|
||||
import { ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@/constants/issue";
|
||||
import { STATE_GROUPS } from "@/constants/state";
|
||||
// helpers
|
||||
import { orderArrayBy } from "@/helpers/array.helper";
|
||||
import { getDate } from "@/helpers/date-time.helper";
|
||||
|
||||
type THandleIssuesMutation = (
|
||||
formData: Partial<TIssue>,
|
||||
|
|
@ -205,3 +205,9 @@ export const formatTextList = (TextArray: string[]): string => {
|
|||
return `${TextArray.slice(0, 3).join(", ")}, and +${count - 3} more`;
|
||||
}
|
||||
};
|
||||
|
||||
export const getDescriptionPlaceholder = (isFocused: boolean, description: string | undefined): string => {
|
||||
const isDescriptionEmpty = !description || description === "<p></p>" || description.trim() === "";
|
||||
if (!isDescriptionEmpty || isFocused) return "Press '/' for commands...";
|
||||
else return "Click to add description";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue