Skip to content

Commit adb3e52

Browse files
Do not show release notes for standalone screens (#9147)
1 parent fe50fc1 commit adb3e52

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

packages/devtools_app/lib/src/framework/release_notes.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,14 @@ class ReleaseNotesController extends SidePanelController {
6565
}
6666

6767
void _maybeShowReleaseNotes() async {
68-
// Do not show release notes in embedded sidebar.
68+
// Do not show release notes in standalone screens. The fact that these
69+
// screens are hosted by DevTools is an implementation detail, but from the
70+
// user's perspective, these tools are part of the IDE.
6971
if (isEmbedded()) {
7072
final currentUrl = getWebUrl();
7173
final currentPage =
7274
currentUrl != null ? extractCurrentPageFromUrl(currentUrl) : null;
73-
if (currentPage == StandaloneScreenType.vsCodeFlutterPanel.name ||
74-
currentPage == StandaloneScreenType.editorSidebar.name) {
75-
return;
76-
}
75+
if (StandaloneScreenType.includes(currentPage)) return;
7776
}
7877

7978
SemanticVersion previousVersion = SemanticVersion();

packages/devtools_app/lib/src/standalone_ui/standalone_screen.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ enum StandaloneScreenType {
5656
),
5757
};
5858
}
59+
60+
static bool includes(String? screenName) =>
61+
values.any((value) => value.name == screenName);
5962
}
6063

6164
/// Widget that returns a [CenteredCircularProgressIndicator] while it waits for

0 commit comments

Comments
 (0)