Skip to content

Commit

Permalink
Do not show release notes in the Flutter sidebar. (flutter#7166)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenzieschmoll authored Feb 5, 2024
1 parent 762e15f commit ff73576
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@

import 'dart:async';

import 'package:devtools_app_shared/utils.dart';
import 'package:devtools_shared/devtools_shared.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:logging/logging.dart';

import '../../../devtools.dart' as devtools;
import '../../shared/primitives/url_utils.dart';
import '../../shared/server/server.dart' as server;
import '../../shared/side_panel.dart';
import '../../shared/utils.dart';
import '../../standalone_ui/standalone_screen.dart';

final _log = Logger('release_notes');

Expand Down Expand Up @@ -57,6 +61,15 @@ class ReleaseNotesController extends SidePanelController {
}

void _maybeShowReleaseNotes() async {
final currentUrl = getWebUrl();
final currentPage =
currentUrl != null ? extractCurrentPageFromUrl(currentUrl) : null;
if (isEmbedded() &&
currentPage == StandaloneScreenType.vsCodeFlutterPanel.name) {
// Do not show release notes in the Flutter sidebar.
return;
}

SemanticVersion previousVersion = SemanticVersion();
if (server.isDevToolsServerAvailable) {
final lastReleaseNotesShownVersion =
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ TODO: Remove this section if there are not any general updates.

## VS Code Sidebar updates

TODO: Remove this section if there are not any general updates.
* Do not show DevTools release notes in the Flutter sidebar. - [#7166](https://github.com/flutter/devtools/pull/7166)

## DevTools Extension updates

Expand Down
3 changes: 3 additions & 0 deletions packages/devtools_app/test/shared/release_notes_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
// found in the LICENSE file.

import 'package:devtools_app/devtools_app.dart';
import 'package:devtools_app_shared/ui.dart';
import 'package:devtools_app_shared/utils.dart';
import 'package:devtools_shared/devtools_shared.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
group('$ReleaseNotesController', () {
late ReleaseNotesController controller;
setUp(() {
setGlobal(IdeTheme, IdeTheme());
debugTestReleaseNotes = true;
controller = ReleaseNotesController();
});
Expand Down

0 comments on commit ff73576

Please sign in to comment.