π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
[WEB-5449] fix: enhance content check for unique ID generation and update issue loader condition (#8132)
Vipin Chaudharyb73cf4f0e2a4
diff --git a/apps/web/core/components/inbox/content/issue-root.tsx b/apps/web/core/components/inbox/content/issue-root.tsxindex 51531cb7cb..f1f7c7d9d3 100644--- a/apps/web/core/components/inbox/content/issue-root.tsx+++ b/apps/web/core/components/inbox/content/issue-root.tsx@@ -191,7 +191,7 @@ export const InboxIssueMainContent: React.FC<Props> = observer((props) => {containerClassName="-ml-3"/>- {loader === "issue-loading" ? (+ {loader === "issue-loading" || issue.description_html === undefined ? (<DescriptionInputLoader />) : (<DescriptionInputdiff --git a/packages/editor/src/core/extensions/unique-id/extension.ts b/packages/editor/src/core/extensions/unique-id/extension.tsindex 93950836b5..c07ade359e 100644--- a/packages/editor/src/core/extensions/unique-id/extension.ts+++ b/packages/editor/src/core/extensions/unique-id/extension.ts@@ -122,7 +122,7 @@ export const UniqueID = Extension.create<UniqueIDOptions>({// If not synced, the listener will be registered in the plugin// and handled there with proper cleanup} else {- return createIdsForView(this.editor.view, this.options);+ createIdsForView(this.editor.view, this.options);}},diff --git a/packages/editor/src/core/extensions/unique-id/utils.ts b/packages/editor/src/core/extensions/unique-id/utils.tsindex 044a9dcead..617ff5dc62 100644--- a/packages/editor/src/core/extensions/unique-id/utils.ts+++ b/packages/editor/src/core/extensions/unique-id/utils.ts@@ -10,6 +10,13 @@ export const createIdsForView = (view: EditorView, options: UniqueIDOptions) =>const { state } = view;const { tr, doc } = state;const { types, attributeName, generateUniqueID } = options;++ // size > 2 means more than just the default empty paragraph+ const hasContent = doc.content.size > 2;+ if (!hasContent) {+ return;+ }+const nodesWithoutId = findChildren(doc,(node) => types.includes(node.type.name) && node.attrs[attributeName] === null