@@ -45,7 +45,8 @@ export class CompassShell extends Component {
45
45
46
46
this . state = {
47
47
initialHistory : this . props . historyStorage ? null : [ ] ,
48
- isExpanded : ! ! this . props . isExpanded
48
+ isExpanded : ! ! this . props . isExpanded ,
49
+ isOperationInProgress : false
49
50
} ;
50
51
}
51
52
@@ -57,6 +58,18 @@ export class CompassShell extends Component {
57
58
this . shellOutput = output ;
58
59
}
59
60
61
+ onOperationStarted = ( ) => {
62
+ this . setState ( {
63
+ isOperationInProgress : true
64
+ } ) ;
65
+ }
66
+
67
+ onOperationEnd = ( ) => {
68
+ this . setState ( {
69
+ isOperationInProgress : false
70
+ } ) ;
71
+ }
72
+
60
73
lastOpenHeight = defaultShellHeightOpened ;
61
74
resizableRef = null ;
62
75
@@ -123,7 +136,8 @@ export class CompassShell extends Component {
123
136
*/
124
137
render ( ) {
125
138
const {
126
- isExpanded
139
+ isExpanded,
140
+ isOperationInProgress
127
141
} = this . state ;
128
142
129
143
if ( ! this . props . runtime || ! this . state . initialHistory ) {
@@ -154,20 +168,25 @@ export class CompassShell extends Component {
154
168
< ShellHeader
155
169
isExpanded = { isExpanded }
156
170
onShellToggleClicked = { this . shellToggleClicked }
171
+ isOperationInProgress = { isOperationInProgress }
157
172
/>
158
- { isExpanded && (
159
- < div
160
- className = { classnames ( styles [ 'compass-shell-shell-container' ] ) }
161
- >
162
- < Shell
163
- runtime = { this . props . runtime }
164
- initialHistory = { this . state . initialHistory }
165
- initialOutput = { this . shellOutput }
166
- onHistoryChanged = { this . saveHistory }
167
- onOutputChanged = { this . onShellOutputChanged }
168
- />
169
- </ div >
170
- ) }
173
+ < div
174
+ className = { classnames (
175
+ styles [ 'compass-shell-shell-container' ] , {
176
+ [ styles [ 'compass-shell-shell-container-visible' ] ] : isExpanded
177
+ }
178
+ ) }
179
+ >
180
+ < Shell
181
+ runtime = { this . props . runtime }
182
+ initialHistory = { this . state . initialHistory }
183
+ initialOutput = { this . shellOutput }
184
+ onHistoryChanged = { this . saveHistory }
185
+ onOutputChanged = { this . onShellOutputChanged }
186
+ onOperationStarted = { this . onOperationStarted }
187
+ onOperationEnd = { this . onOperationEnd }
188
+ />
189
+ </ div >
171
190
</ Resizable >
172
191
</ Fragment >
173
192
) ;
0 commit comments