File tree 3 files changed +56
-26
lines changed
3 files changed +56
-26
lines changed Original file line number Diff line number Diff line change 55
55
fill : var (--jp-ui-font-color1 );
56
56
}
57
57
58
+ .elyra-codeSnippetsHeader + div : first-of-type {
59
+ overflow-y : auto;
60
+ height : calc (100vh - 95px );
61
+ }
62
+
58
63
.elyra-codeSnippet-item {
59
64
border-bottom : var (--jp-border-width ) solid var (--jp-border-color2 );
60
65
display : flex;
63
68
padding : 0 ;
64
69
}
65
70
66
- .elyra-codeSnippet-item .CodeMirror-wrap {
71
+ .elyra-codeSnippet-item .elyra-expandableContainer-details-visible {
72
+ background-color : var (--jp-cell-editor-background );
73
+ resize : vertical;
74
+ height : 100px ;
75
+ }
76
+
77
+ .elyra-codeSnippet-item .CodeMirror .cm-s-jupyter {
67
78
background-color : inherit;
68
79
border : none;
69
80
font-family : var (--jp-code-font-family );
70
81
font-size : var (--jp-code-font-size );
71
82
line-height : var (--jp-code-line-height );
72
- height : 100% ;
73
- width : 100% ;
74
- resize : vertical;
75
- white-space : pre;
76
- word-wrap : normal;
77
- overflow-x : scroll;
78
83
}
79
84
80
85
.elyra-codeSnippet-saveButton {
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- import { FormGroup , Intent } from '@blueprintjs/core' ;
17
+ import { FormGroup , Intent , ResizeSensor } from '@blueprintjs/core' ;
18
18
19
19
import { FrontendServices , IDictionary } from '@elyra/application' ;
20
20
import { DropDown } from '@elyra/ui-components' ;
@@ -343,13 +343,19 @@ export class MetadataEditor extends ReactWidget {
343
343
}
344
344
return (
345
345
< FormGroup
346
- style = { { width : '100%' , display : 'flex' } }
346
+ className = { 'elyra-metadataEditor-code' }
347
347
labelInfo = { required }
348
348
label = { 'Code' }
349
349
intent = { this . schema [ fieldName ] . uihints . intent }
350
350
helperText = { helperText }
351
351
>
352
- < div id = { 'code:' + this . id } className = "elyra-form-code" > </ div >
352
+ < ResizeSensor
353
+ onResize = { ( ) : void => {
354
+ this . editor . refresh ( ) ;
355
+ } }
356
+ >
357
+ < div id = { 'code:' + this . id } className = "elyra-form-code va-va" > </ div >
358
+ </ ResizeSensor >
353
359
</ FormGroup >
354
360
) ;
355
361
} else {
@@ -373,7 +379,6 @@ export class MetadataEditor extends ReactWidget {
373
379
return (
374
380
< div className = { ELYRA_METADATA_EDITOR_CLASS } >
375
381
< h3 > { headerText } </ h3 >
376
- < br />
377
382
{ this . renderTextInput (
378
383
'Name' ,
379
384
'' ,
Original file line number Diff line number Diff line change 3
3
}
4
4
5
5
.elyra-metadataEditor .bp3-form-group {
6
- width : 40% ;
7
- float : left;
8
6
margin-bottom : 12px ;
9
7
margin-right : 20px ;
8
+ flex-basis : 40% ;
9
+ height : 65px ;
10
10
}
11
11
12
12
.bp3-select-popover {
23
23
}
24
24
25
25
.elyra-metadataEditor {
26
- margin : 20px ;
26
+ padding : 20px ;
27
27
display : flex;
28
28
flex-wrap : wrap;
29
+ height : 100% ;
30
+ align-content : flex-start;
31
+ align-items : flex-start;
32
+ justify-content : flex-start;
29
33
}
30
34
31
35
.elyra-metadataEditor h3 {
32
- width : 100% ;
33
- margin-bottom : 10 px ;
36
+ flex-basis : 100% ;
37
+ margin-bottom : 15 px ;
34
38
color : var (--jp-ui-font-color1 );
35
39
}
36
40
37
41
.elyra-metadataEditor label .bp3-label {
38
42
color : var (--jp-ui-font-color1 );
39
43
}
40
44
41
- .elyra-metadataEditor .CodeMirror-wrap {
45
+ .elyra-metadataEditor .elyra-form-code .jp-CodeMirrorEditor {
46
+ background-color : var (--jp-cell-editor-background );
47
+ border : var (--jp-border-width ) solid var (--jp-input-border-color );
48
+ overflow-y : auto;
49
+ resize : vertical;
50
+ min-height : 150px ;
51
+ height : 150px ;
52
+ padding-bottom : 10px ;
53
+ cursor : initial;
54
+ }
55
+
56
+ .elyra-metadataEditor .CodeMirror .cm-s-jupyter {
42
57
background-color : inherit;
43
- box-shadow : inset 0 0 0 var (--jp-border-width ) var (--jp-input-border-color );
44
- font-family : var (--jp-code-font-family );
45
- font-size : var (--jp-code-font-size );
46
- line-height : var (--jp-code-line-height );
47
58
height : 100% ;
48
- width : 100% ;
49
- resize : vertical;
50
- white-space : pre;
51
- word-wrap : normal;
52
- overflow : scroll;
59
+ }
60
+
61
+ .elyra-metadataEditor .bp3-form-group .elyra-metadataEditor-code {
62
+ height : auto;
63
+ flex-basis : 100% ;
64
+ display : flex;
65
+ }
66
+
67
+ .elyra-metadataEditor-code .bp3-form-content {
68
+ height : 100% ;
53
69
}
54
70
55
71
.bp3-dark .bp3-input {
56
72
border : var (--jp-border-width ) solid var (--jp-input-border-color );
57
73
color : var (--jp-ui-font-color1 );
58
74
}
59
75
76
+ .elyra-metadata-editor {
77
+ overflow-y : auto;
78
+ }
79
+
60
80
.elyra-metadata-editor .bp3-dark {
61
81
background-color : var (--jp-border-color3 );
62
82
}
You can’t perform that action at this time.
0 commit comments