From 832795c8b38109d1b3e2179fcf79be45498f1d4e Mon Sep 17 00:00:00 2001 From: surya4419 Date: Sun, 16 Mar 2025 11:02:20 +0530 Subject: [PATCH 1/2] fix(ui): add proper margin to error notification for consistent spacing Signed-off-by: surya4419 --- src/utils/helpers/Errors.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/helpers/Errors.tsx b/src/utils/helpers/Errors.tsx index 4c4a5e4f..471c1b77 100644 --- a/src/utils/helpers/Errors.tsx +++ b/src/utils/helpers/Errors.tsx @@ -4,7 +4,7 @@ import { Alert, Space } from "antd"; function Errors() { const error = useAppStore((state) => state.error); return error ? ( - + ) : ( From ea30b8bf4f14ef549cba53998a49195d8d41d4d4 Mon Sep 17 00:00:00 2001 From: Surya Ganesh Yadala <149884309+surya4419@users.noreply.github.com> Date: Thu, 27 Mar 2025 19:25:45 +0530 Subject: [PATCH 2/2] feat(editor): Add auto-pairing for curly braces in Concerto model (#281) * feat(editor): Add auto-pairing for curly braces in Concerto model section Signed-off-by: surya4419 * feat(editor): Add auto-pairing for curly braces in Concerto model section Signed-off-by: surya4419 * feat(editor): Add auto-pairing for curly braces in Concerto model section Signed-off-by: surya4419 --------- Signed-off-by: surya4419 --- src/AgreementHtml.tsx | 2 +- src/editors/ConcertoEditor.tsx | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/AgreementHtml.tsx b/src/AgreementHtml.tsx index 4e9d2c05..031cb9f6 100644 --- a/src/AgreementHtml.tsx +++ b/src/AgreementHtml.tsx @@ -4,7 +4,7 @@ import { Spin } from "antd"; import useAppStore from "./store/store"; import FullScreenModal from "./components/FullScreenModal"; -function AgreementHtml({ loading, isModal }: { loading: any; isModal?: boolean }) { +function AgreementHtml({ loading, isModal }: { loading: boolean; isModal?: boolean }) { const agreementHtml = useAppStore((state) => state.agreementHtml); const backgroundColor = useAppStore((state) => state.backgroundColor); const textColor = useAppStore((state) => state.textColor); diff --git a/src/editors/ConcertoEditor.tsx b/src/editors/ConcertoEditor.tsx index e5e0ce99..3fb26457 100644 --- a/src/editors/ConcertoEditor.tsx +++ b/src/editors/ConcertoEditor.tsx @@ -48,6 +48,26 @@ const handleEditorWillMount = (monacoInstance: typeof monaco) => { mimetypes: ["application/vnd.accordproject.concerto"], }); + monacoInstance.languages.setLanguageConfiguration("concerto", { + brackets: [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ], + autoClosingPairs: [ + { open: "{", close: "}" }, + { open: "[", close: "]" }, + { open: "(", close: ")" }, + { open: "\"", close: "\"" }, + ], + surroundingPairs: [ + { open: "{", close: "}" }, + { open: "[", close: "]" }, + { open: "(", close: ")" }, + { open: "\"", close: "\"" }, + ], + }); + monacoInstance.languages.setMonarchTokensProvider("concerto", { keywords: concertoKeywords, typeKeywords: concertoTypes, @@ -125,6 +145,9 @@ export default function ConcertoEditor({ wordWrap: "on", automaticLayout: true, scrollBeyondLastLine: false, + autoClosingBrackets: "languageDefined", + autoSurround: "languageDefined", + bracketPairColorization: { enabled: true }, }; const handleChange = useCallback(