Merge pull request #877 from makeplane/sync/ce-ee

sync: community changes
This commit is contained in:
Satish Gandham
2024-08-20 15:53:06 +05:30
committed by GitHub
2 changed files with 17 additions and 10 deletions

View File

@@ -79,6 +79,7 @@
-moz-appearance: textfield;
}
/* Placeholder only for the first line in an empty editor. */
.ProseMirror p.is-editor-empty:first-child::before {
content: attr(data-placeholder);
float: left;
@@ -87,6 +88,15 @@
height: 0;
}
/* Display Placeholders on every new line. */
.ProseMirror p.is-empty::before {
content: attr(data-placeholder);
float: left;
color: rgb(var(--color-text-400));
pointer-events: none;
height: 0;
}
.ProseMirror li blockquote {
margin-top: 10px;
padding-inline-start: 1em;
@@ -110,14 +120,6 @@
display: none;
}
.ProseMirror .is-empty::before {
content: attr(data-placeholder);
float: left;
color: rgb(var(--color-text-400));
pointer-events: none;
height: 0;
}
/* Custom image styles */
.ProseMirror img {
transition: filter 0.1s ease-in-out;

View File

@@ -25,7 +25,7 @@ import { getTabIndex } from "@/helpers/issue-modal.helper";
import { getChangedIssuefields } from "@/helpers/issue.helper";
// hooks
import { useIssueModal } from "@/hooks/context/use-issue-modal";
import { useIssueDetail, useProject } from "@/hooks/store";
import { useIssueDetail, useProject, useProjectState } from "@/hooks/store";
import { useProjectIssueProperties } from "@/hooks/use-project-issue-properties";
// plane web components
import { IssueAdditionalProperties, IssueTypeSelect } from "@/plane-web/components/issues/issue-modal";
@@ -89,6 +89,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
issue: { getIssueById },
} = useIssueDetail();
const { fetchCycles } = useProjectIssueProperties();
const { getStateById } = useProjectState();
// form info
const {
formState: { errors, isDirty, isSubmitting, dirtyFields },
@@ -220,6 +221,8 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
const projectDetails = getProjectById(issue.project_id);
if (!projectDetails) return;
const stateDetails = getStateById(issue.state_id);
setSelectedParentIssue({
id: issue.id,
name: issue.name,
@@ -227,8 +230,10 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
project__identifier: projectDetails.identifier,
project__name: projectDetails.name,
sequence_id: issue.sequence_id,
type_id: issue.type_id,
state__color: stateDetails?.color,
} as ISearchIssueResponse);
}, [watch, getIssueById, getProjectById, selectedParentIssue]);
}, [watch, getIssueById, getProjectById, selectedParentIssue, getStateById]);
// executing this useEffect when isDirty changes
useEffect(() => {