11import { globalStyles , animations , overlayStyles , dialogStyles , minimizedStyles , cardStyles , buttonStyles , progressOverlayStyles } from './styles' ;
22import { MinimizedButton } from './components/MinimizedButton' ;
33// import { Dialog } from './components/Dialog';
4- // import { ServiceContainer } from './services/ServiceContainer';
4+ import { ServiceContainer } from './services/ServiceContainer' ;
55
66// class DialogPanel {
77// private element: HTMLDivElement;
@@ -91,7 +91,7 @@ export default class WelcomePanel {
9191 private minimizedPanel : MinimizedPanel ;
9292 // private dialogPanel: DialogPanel;
9393
94- constructor ( ) {
94+ constructor ( private serviceContainer : ServiceContainer ) {
9595
9696 this . element = document . createElement ( 'div' ) ;
9797 this . element . id = 'jp-kernel-welcome-panel' ;
@@ -109,6 +109,21 @@ export default class WelcomePanel {
109109 ] . join ( '\n' ) ;
110110 document . head . appendChild ( styleElement ) ;
111111
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+
112127 const minimizedButton = new MinimizedButton ( ( ) => this . show ( ) ) ;
113128 this . minimizedPanel = new MinimizedPanel ( minimizedButton ) ;
114129
@@ -156,6 +171,7 @@ export default class WelcomePanel {
156171 }
157172
158173 show ( ) : void {
174+ // This is where we will do or invoke the toggling of the connection
159175 this . element . style . display = 'block' ;
160176 this . element . classList . remove ( 'minimized' ) ;
161177 this . element . classList . add ( 'visible' ) ;
@@ -164,7 +180,7 @@ export default class WelcomePanel {
164180 this . element . style . opacity = '1' ;
165181
166182 // this.dialogPanel.show();
167- this . minimizedPanel . hide ( ) ;
183+ // this.minimizedPanel.hide();
168184 }
169185
170186 hide ( ) : void {
0 commit comments