Skip to content

Commit

Permalink
* MS user can edit the text-negation or text-question field (in detai…
Browse files Browse the repository at this point in the history
…ls panel), in any situation where it is non-empty / already set previously.
  • Loading branch information
Venryx committed May 14, 2024
1 parent 4b8360c commit 798dbcf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
22 changes: 10 additions & 12 deletions Packages/client/Source/UI/Database/Phrasings/PhrasingDetailsUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,16 @@ class OtherTitles extends BaseComponent<PhrasingDetailsUI_SharedProps, {}> {
const showNarrativeForm = ShouldShowNarrativeFormForEditing(childLayout, node.current.phrasing);
return (
<>
{node.type == NodeType.claim && <>
<RowLR mt={5} splitAt={splitAt} style={{width: "100%"}}>
<Pre>Title (negation): </Pre>
<TitleInput {...OmitRef(this.props)} titleKey="text_negation"/>
</RowLR>
<RowLR mt={5} splitAt={splitAt} style={{width: "100%"}}>
<Pre>Title (question): </Pre>
{/* <TextInput enabled={enabled} style={ES({flex: 1})} required={willUseQuestionTitleHere}
value={newRevisionData.titles["question"]} onChange={val=>Change(newRevisionData.titles["question"] = val)}/> */}
<TitleInput {...OmitRef(this.props)} titleKey="text_question"/>
</RowLR>
</>}
{(node.type == NodeType.claim || (node.current.phrasing.text_negation ?? "").trim().length > 0) &&
<RowLR mt={5} splitAt={splitAt} style={{width: "100%"}}>
<Pre>Title (negation): </Pre>
<TitleInput {...OmitRef(this.props)} titleKey="text_negation"/>
</RowLR>}
{(node.type == NodeType.claim || (node.current.phrasing.text_question ?? "").trim().length > 0) &&
<RowLR mt={5} splitAt={splitAt} style={{width: "100%"}}>
<Pre>Title (question): </Pre>
<TitleInput {...OmitRef(this.props)} titleKey="text_question"/>
</RowLR>}
{showNarrativeForm &&
<RowLR mt={5} splitAt={splitAt} style={{width: "100%"}}>
<Pre>Title (narrative): </Pre>
Expand Down
1 change: 0 additions & 1 deletion Packages/js-common/Source/DB/nodes/$node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]];
Expand Down

0 comments on commit 798dbcf

Please sign in to comment.