You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/08/07 22:10:44 UTC

[GitHub] [druid] gianm commented on a change in pull request #10256: Web console: improve JSON paste experience

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org