1
1
import { globalStyles , animations , overlayStyles , dialogStyles , minimizedStyles , cardStyles , buttonStyles , progressOverlayStyles } from './styles' ;
2
2
import { MinimizedButton } from './components/MinimizedButton' ;
3
3
// import { Dialog } from './components/Dialog';
4
- // import { ServiceContainer } from './services/ServiceContainer';
4
+ import { ServiceContainer } from './services/ServiceContainer' ;
5
5
6
6
// class DialogPanel {
7
7
// private element: HTMLDivElement;
@@ -91,7 +91,7 @@ export default class WelcomePanel {
91
91
private minimizedPanel : MinimizedPanel ;
92
92
// private dialogPanel: DialogPanel;
93
93
94
- constructor ( ) {
94
+ constructor ( private serviceContainer : ServiceContainer ) {
95
95
96
96
this . element = document . createElement ( 'div' ) ;
97
97
this . element . id = 'jp-kernel-welcome-panel' ;
@@ -109,6 +109,21 @@ export default class WelcomePanel {
109
109
] . join ( '\n' ) ;
110
110
document . head . appendChild ( styleElement ) ;
111
111
112
+ // TODO:
113
+ // 1) We no longer want the dialog to be shown on startup and we also don't want it
114
+ // to be shown when the user clicks on the minimized button.
115
+ // 2) We want to act as if the connect card was clicked when the user clicks on the minimized button.
116
+ // 3) We want there to be a new popup if connecting to the device fails that contains suggestions for why
117
+
118
+ // currently objects are like this:
119
+
120
+ // WelcomePanel -> MinimizedPanel -> MinimizedButton -> DeviceService <-|
121
+ // WelcomePanel -> DialogPanel -> Dialog -> ConnectCard -> DeviceService <-|
122
+ // We want to change this to be like this:
123
+ // WelcomePanel -> MinimizedPanel -> MinimizedButton -> DeviceService
124
+
125
+ // need a good way to add the same connection behavior but up a level
126
+
112
127
const minimizedButton = new MinimizedButton ( ( ) => this . show ( ) ) ;
113
128
this . minimizedPanel = new MinimizedPanel ( minimizedButton ) ;
114
129
@@ -156,6 +171,7 @@ export default class WelcomePanel {
156
171
}
157
172
158
173
show ( ) : void {
174
+ // This is where we will do or invoke the toggling of the connection
159
175
this . element . style . display = 'block' ;
160
176
this . element . classList . remove ( 'minimized' ) ;
161
177
this . element . classList . add ( 'visible' ) ;
@@ -164,7 +180,7 @@ export default class WelcomePanel {
164
180
this . element . style . opacity = '1' ;
165
181
166
182
// this.dialogPanel.show();
167
- this . minimizedPanel . hide ( ) ;
183
+ // this.minimizedPanel.hide();
168
184
}
169
185
170
186
hide ( ) : void {
0 commit comments