jason810496 commented on code in PR #74231:
URL: https://github.com/apache/airflow/pull/74231#discussion_r4184047274


##########
airflow-core/src/airflow/ui/src/components/MonacoEditor/configureMonaco.ts:
##########
@@ -58,17 +58,48 @@ const loadMonacoModules = async () => {
     ),
   ]);
 
-  // The JSON feature registers its language as a side effect. Python is 
registered
-  // manually below from its grammar module instead of importing its register 
module,
-  // whose lazy tokens provider would overwrite our patched grammar on first 
use.
-  // The runtime guard below fails loudly if the grammar export shape changes.
+  // The JSON feature registers its language as a side effect. The 
Dag-authoring languages
+  // are registered manually below from their grammar modules instead: Python 
needs its
+  // patched grammar (triple-quoted f-string support) applied before 
registering, which
+  // importing its register module instead would not allow, and the others are 
registered
+  // the same way for consistency.
+  // The runtime guard below fails loudly if a grammar export shape changes.
   const jsonContribution = 
import("monaco-editor/languages/features/json/register");
   const pythonGrammar = 
import("monaco-editor/languages/definitions/python/python");
+  const typescriptGrammar = 
import("monaco-editor/languages/definitions/typescript/typescript");
+  const javaGrammar = import("monaco-editor/languages/definitions/java/java");
+  const goGrammar = import("monaco-editor/languages/definitions/go/go");

Review Comment:
   I'm not the frontend side expert.
   Do we need the lazy import or lazy instantiation for these grammer / 
highlighter for the Language SDKs?  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to