gianm commented on a change in pull request #10256:
URL: https://github.com/apache/druid/pull/10256#discussion_r467307678



##########
File path: web-console/src/components/json-input/json-input.tsx
##########
@@ -24,7 +24,9 @@ import AceEditor from 'react-ace';
 import './json-input.scss';
 
 function parseHjson(str: string) {
-  return str === '' ? null : Hjson.parse(str);
+  // Throwing on empty input is more consistent with how JSON.parse works

Review comment:
       What happens when the text in the area can't be parsed?

##########
File path: 
web-console/src/dialogs/spec-dialog/__snapshots__/spec-dialog.spec.tsx.snap
##########
@@ -1,6 +1,187 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
-exports[`spec dialog matches snapshot 1`] = `
+exports[`spec dialog matches snapshot no initSpec 1`] = `

Review comment:
       What's all this new stuff for and what are the 
`XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`
 about?

##########
File path: web-console/src/dialogs/spec-dialog/spec-dialog.tsx
##########
@@ -65,6 +65,7 @@ export const SpecDialog = React.memo(function 
SpecDialog(props: SpecDialogProps)
           tabSize: 2,
         }}
         style={{}}
+        placeholder="{ JSON spec... }"

Review comment:
       What does `placeholder` do?




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to