File tree Expand file tree Collapse file tree 6 files changed +40
-20
lines changed
operation-details/react/runtime
operation-list/react/runtime
website/styles/widgets/fui Expand file tree Collapse file tree 6 files changed +40
-20
lines changed Original file line number Diff line number Diff line change @@ -280,14 +280,16 @@ export const OperationConsoleGql = ({
280280 const sendRequest = async ( ) => {
281281 setSendingRequest ( true ) ;
282282
283- try {
284- JSON . parse ( queryVariables ) ;
285- }
286- catch ( error ) {
287- setSelectedTab ( ConsoleTab . response ) ;
288- setRequestError ( 'Invalid "Query variables" JSON format.' ) ;
289- setSendingRequest ( false ) ;
290- return ;
283+ if ( queryVariables . length > 0 ) {
284+ try {
285+ JSON . parse ( queryVariables ) ;
286+ }
287+ catch ( error ) {
288+ setSelectedTab ( ConsoleTab . response ) ;
289+ setRequestError ( 'Invalid "Query variables" JSON format.' ) ;
290+ setSendingRequest ( false ) ;
291+ return ;
292+ }
291293 }
292294
293295 const payload = JSON . stringify ( {
@@ -406,6 +408,7 @@ export const OperationConsoleGql = ({
406408 && < Input
407409 value = { ( child as GraphQLInputTreeNode ) . inputValue ( ) }
408410 onChange = { ( _ , data ) => ( child as GraphQLInputTreeNode ) . changeInputValue ( data . value ) }
411+ autoComplete = "off"
409412 />
410413
411414 : < > </ >
@@ -482,7 +485,7 @@ export const OperationConsoleGql = ({
482485 }
483486 </ Accordion >
484487 </ Stack . Item >
485- < Stack . Item grow >
488+ < Stack . Item grow className = { "gql-query" } >
486489 < Stack >
487490 < Stack . Item className = { "gql-query-editor" } >
488491 < Editor
Original file line number Diff line number Diff line change @@ -342,7 +342,7 @@ export const OperationDetails = ({
342342 </ div >
343343 </ div >
344344 { enableConsole && < button className = "button" onClick = { ( ) => setIsConsoleOpen ( true ) } > Try this operation</ button > }
345- { request &&
345+ { request && request . isMeaningful ( ) &&
346346 < div className = { "operation-request" } >
347347 < h4 className = { "operation-subtitle1" } > Request</ h4 >
348348 { request . description && < MarkdownProcessor markdownToDisplay = { request . description } /> }
Original file line number Diff line number Diff line change @@ -194,8 +194,10 @@ export const OperationList = ({
194194 < Stack
195195 key = { operation . id }
196196 horizontal
197- className = { `operation ${ operation . name === selectedOperationName && `is-selected-operation` } ` }
197+ className = { `operation ${ operation . name === selectedOperationName ? `is-selected-operation` : "" } ` }
198198 onClick = { ( ) => selectOperation ( operation ) }
199+ onKeyDown = { e => e . key === "Enter" && selectOperation ( operation ) }
200+ tabIndex = { 0 }
199201 >
200202 { operation . name === selectedOperationName
201203 ? < >
Original file line number Diff line number Diff line change @@ -121,15 +121,9 @@ h2 {
121121
122122 & .toolbox-btn-is-active {
123123 position : relative ;
124-
125- & :before {
126- @include fit ();
127- position : absolute ;
128- background-color : $toolbox-btn-active-bg ;
129- border : 1px solid $toolbox-btn-active-border ;
130- border-radius : $toolbox-border-radius - 5px ;
131- content : " " ;
132- }
124+ background-color : $toolbox-btn-active-bg ;
125+ border : 1px solid $toolbox-btn-active-border ;
126+ border-radius : $toolbox-border-radius - 5px ;
133127 }
134128
135129 & .pull-down {
Original file line number Diff line number Diff line change @@ -226,6 +226,10 @@ fui-operation-details {
226226 .ws-connect-button {
227227 margin-bottom : 2rem ;
228228 }
229+
230+ .fui-Field__validationMessageIcon {
231+ vertical-align : 1px ;
232+ }
229233}
230234
231235.console-gql-drawer {
@@ -244,18 +248,30 @@ fui-operation-details {
244248 .gql-search {
245249 width : 100% ;
246250 margin-bottom : 1.5rem ;
251+
252+ input {
253+ // These styles are needed to remove the search icon used for default search input
254+ background : none ;
255+ padding-left : 5px !important ;
256+ }
247257 }
248258
249259 .gql-explorer {
250260 width : 350px ;
251261 padding : 2rem 1.5rem 2rem 0 ;
252262 border-right : 1px solid #E6E6E6 ;
263+ overflow : auto ;
264+ max-height : calc (100vh - 150px );
253265
254266 .level0-node-label {
255267 text-transform : capitalize ;
256268 }
257269 }
258270
271+ .gql-query {
272+ width : calc (100% - 350px );
273+ }
274+
259275 .gql-query-editor {
260276 padding-top : 2rem ;
261277 border-bottom : 1px solid #E6E6E6 ;
Original file line number Diff line number Diff line change @@ -37,6 +37,11 @@ fui-operation-list {
3737 margin-bottom : .5rem ;
3838 border-left : 5px solid transparent ;
3939
40+ & :hover {
41+ background-color : #F5F5F5 ;
42+ border-radius : .25rem ;
43+ }
44+
4045 & .is-selected-operation {
4146 background-color : #EBEBEB ;
4247 border-left-color : #0F6CBD ;
You can’t perform that action at this time.
0 commit comments