Having a Widget open by default

I am creating a new widget, I wanted it to be opened by default when the IDE is launched, I tried using

async initializeLayout(app: FrontendApplication): Promise {
await this.openView({activate: false, reveal: true});
}

but this is not working

@Sreeranjani thank you for the discussion :+1:

If we look at the documentation for initializeLayout we’ll see that the method is used to define a default layout for the application, since it applies when no workbench state exists:

Instead, you’ll probably always want to display the widget or under certain conditions so you can follow the way that the getting-started view works:

It uses the application’s onStart lifecycle hook to open your view.

1 Like

Thanks for the suggestions, I will look into it

1 Like

I was able to get this working. Thanks :slight_smile:

1 Like