From 798dbcf82e7a3602ffb59992cc024fff0cf69902 Mon Sep 17 00:00:00 2001 From: Venryx Date: Tue, 14 May 2024 01:28:43 -0700 Subject: [PATCH] * MS user can edit the text-negation or text-question field (in details panel), in any situation where it is non-empty / already set previously. --- .../Database/Phrasings/PhrasingDetailsUI.tsx | 22 +++++++++---------- Packages/js-common/Source/DB/nodes/$node.ts | 1 - 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Packages/client/Source/UI/Database/Phrasings/PhrasingDetailsUI.tsx b/Packages/client/Source/UI/Database/Phrasings/PhrasingDetailsUI.tsx index 29d1a37f6..3bd526408 100644 --- a/Packages/client/Source/UI/Database/Phrasings/PhrasingDetailsUI.tsx +++ b/Packages/client/Source/UI/Database/Phrasings/PhrasingDetailsUI.tsx @@ -138,18 +138,16 @@ class OtherTitles extends BaseComponent { const showNarrativeForm = ShouldShowNarrativeFormForEditing(childLayout, node.current.phrasing); return ( <> - {node.type == NodeType.claim && <> - -
Title (negation): 
- -
- -
Title (question): 
- {/* Change(newRevisionData.titles["question"] = val)}/> */} - -
- } + {(node.type == NodeType.claim || (node.current.phrasing.text_negation ?? "").trim().length > 0) && + +
Title (negation): 
+ +
} + {(node.type == NodeType.claim || (node.current.phrasing.text_question ?? "").trim().length > 0) && + +
Title (question): 
+ +
} {showNarrativeForm &&
Title (narrative): 
diff --git a/Packages/js-common/Source/DB/nodes/$node.ts b/Packages/js-common/Source/DB/nodes/$node.ts index faf80dee1..02ba013bb 100644 --- a/Packages/js-common/Source/DB/nodes/$node.ts +++ b/Packages/js-common/Source/DB/nodes/$node.ts @@ -345,7 +345,6 @@ export const GetNodeTitleFromPhrasingAndForm = CreateAccessor((phrasing: NodePhr if (form) { if (form == ClaimForm.negation) return [phrasing.text_negation, "text_negation", "text_negation", missingTitleStrings[1]]; if (form == ClaimForm.question) { - //return phrasing.text_question || missingTitleStrings[2]; // for now at least, allow fallback to the base title if (phrasing.text_question != null && phrasing.text_question.trim().length) return [phrasing.text_question, "text_question", "text_question", missingTitleStrings[2]]; return [phrasing.text_base, "text_question", "text_base", missingTitleStrings[2]];