diff --git a/src/ServiceControl.Config/UI/NoInstances/NoInstancesView.xaml b/src/ServiceControl.Config/UI/NoInstances/NoInstancesView.xaml index 6721feccc1..fc08c41d67 100644 --- a/src/ServiceControl.Config/UI/NoInstances/NoInstancesView.xaml +++ b/src/ServiceControl.Config/UI/NoInstances/NoInstancesView.xaml @@ -12,6 +12,6 @@ VerticalAlignment="Center" FontSize="20" Foreground="{StaticResource Gray60Brush}" - Text="No service instances installed" /> + Text="Add an instance to get started" /> diff --git a/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs b/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs index 8e051a585d..658c3c7984 100644 --- a/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs +++ b/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs @@ -102,6 +102,21 @@ protected override async Task OnActivate(CancellationToken cancellationToken = d BeginCheckForUpdates(); } + protected override void OnViewLoaded(object view) + { + base.OnViewLoaded(view); + + // First run: nothing is installed yet, so open the "choose a setup scenario" + // popup immediately instead of leaving the user on the empty instance list. + // OnViewLoaded fires once, so alt-tabbing back or hitting refresh (both of + // which re-run RefreshInstances) won't re-trigger it, and dismissing the + // popup leaves the user on the NoInstances view. + if (!HasInstances) + { + ShowingMenuOverlay = true; + } + } + public async Task RefreshInstances(CancellationToken cancellationToken = default) { HasInstances = InstanceFinder.AllInstances().Any();