You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IDE2 can start with multiple browser windows when restoring all opened sketches. By default, the same frontend application loads in each browser window; hence the same logic runs. Running the same logic in each browser window is sometimes an undesired behavior. For example, when notifying the user about a new IDE2 version or asking the user to participate in a survey must happen in the first window.
Describe the current behavior
The current code handles "the first window" workaround in different ways. See here and here. This is a working solution, but adding a boilerplate service every time with a boolean flag can be generalized.
As a dev, I would expect to do something like this in the future:
@inject(WindowService)privatereadonly windowService: WindowService:
// later in code:onStart(): void{this.windowService.isFirstWindow().then((first)=>{if(first){/* ask survey*/});}
In IDE2, we can customize the existing WindowService and extend it.
Describe the request
Why?
IDE2 can start with multiple browser windows when restoring all opened sketches. By default, the same frontend application loads in each browser window; hence the same logic runs. Running the same logic in each browser window is sometimes an undesired behavior. For example, when notifying the user about a new IDE2 version or asking the user to participate in a survey must happen in the first window.
Describe the current behavior
The current code handles "the first window" workaround in different ways. See here and here. This is a working solution, but adding a boilerplate service every time with a boolean flag can be generalized.
As a dev, I would expect to do something like this in the future:
In IDE2, we can customize the existing
WindowService
and extend it.Arduino IDE version
Version: 2.0.0-rc7 Date: 2022-06-09T08:19:19.877Z CLI Version: 0.23.0 [899dc91b] Copyright © 2022 Arduino SA
Operating system
macOS
Operating system version
12.3.1
Additional context
No response
Issue checklist
The text was updated successfully, but these errors were encountered: