Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legacy integration tests and address several TODOs #8784

Merged
merged 4 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ class MessageColumn extends ColumnData<LogData>
padding: const EdgeInsets.symmetric(vertical: densePadding),
child: LayoutBuilder(
builder: (context, constraints) {
return MetadataChips(
data: data,
maxWidth: constraints.maxWidth,
);
return MetadataChips(data: data);
},
),
),
Expand Down
22 changes: 1 addition & 21 deletions packages/devtools_app/lib/src/screens/logging/metadata.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,9 @@ import '../../shared/primitives/utils.dart';
import 'logging_controller.dart';

class MetadataChips extends StatelessWidget {
const MetadataChips({
super.key,
required this.data,
// TODO(kenz): remove maxWidth from these metadata chips once the Logging
// V2 code is removed.
required this.maxWidth,
});
const MetadataChips({super.key, required this.data});

final LogData data;
final double maxWidth;

@override
Widget build(BuildContext context) {
Expand All @@ -41,7 +34,6 @@ class MetadataChips extends StatelessWidget {
final logLevelChip = LogLevelMetadataChip(
level: logLevel,
rawLevel: data.level,
maxWidth: maxWidth,
backgroundColor: logLevelColors.background,
foregroundColor: logLevelColors.foreground,
);
Expand All @@ -53,7 +45,6 @@ class MetadataChips extends StatelessWidget {
isolateChip = IsolateChip(
name: isolateName,
id: data.isolateRef?.id,
maxWidth: maxWidth,
backgroundColor: colorScheme.surface,
foregroundColor: colorScheme.onSurface,
outlined: true,
Expand All @@ -68,7 +59,6 @@ class MetadataChips extends StatelessWidget {
zoneChip = ZoneChip(
name: zoneName,
identityHashCode: zone!.identityHashCode,
maxWidth: maxWidth,
backgroundColor: colorScheme.surface,
foregroundColor: colorScheme.onSurface,
outlined: true,
Expand Down Expand Up @@ -96,7 +86,6 @@ class MetadataChips extends StatelessWidget {
children: [
KindMetaDataChip(
kind: data.kind,
maxWidth: maxWidth,
icon: kindIcon.icon,
iconAsset: kindIcon.iconAsset,
backgroundColor: kindColors.background,
Expand All @@ -105,7 +94,6 @@ class MetadataChips extends StatelessWidget {
logLevelChip,
if (elapsedFrameTimeAsString != null)
FrameElapsedMetaDataChip(
maxWidth: maxWidth,
elapsedTimeDisplay: elapsedFrameTimeAsString,
),
if (isolateChip != null) isolateChip,
Expand All @@ -118,7 +106,6 @@ class MetadataChips extends StatelessWidget {
abstract class MetadataChip extends StatelessWidget {
const MetadataChip({
super.key,
required this.maxWidth,
required this.text,
this.tooltip,
this.icon,
Expand All @@ -129,7 +116,6 @@ abstract class MetadataChip extends StatelessWidget {
this.includeLeadingMargin = true,
});

final double maxWidth;
final IconData? icon;
final String? iconAsset;
final String text;
Expand All @@ -156,7 +142,6 @@ abstract class MetadataChip extends StatelessWidget {
return maybeWrapWithTooltip(
tooltip: tooltip,
child: Container(
constraints: BoxConstraints(maxWidth: maxWidth),
decoration: BoxDecoration(
color: backgroundColor,
borderRadius: BorderRadius.circular(_borderRadius),
Expand Down Expand Up @@ -207,7 +192,6 @@ class KindMetaDataChip extends MetadataChip {
const KindMetaDataChip({
super.key,
required String kind,
required super.maxWidth,
super.icon,
super.iconAsset,
super.backgroundColor,
Expand Down Expand Up @@ -251,7 +235,6 @@ class KindMetaDataChip extends MetadataChip {
class FrameElapsedMetaDataChip extends MetadataChip {
const FrameElapsedMetaDataChip({
super.key,
required super.maxWidth,
required String elapsedTimeDisplay,
}) : super(icon: Icons.timer, text: elapsedTimeDisplay);
}
Expand All @@ -261,7 +244,6 @@ class LogLevelMetadataChip extends MetadataChip {
super.key,
required Level level,
required int rawLevel,
required super.maxWidth,
super.backgroundColor,
super.foregroundColor,
}) : super(text: 'Level.${level.name} ($rawLevel)');
Expand Down Expand Up @@ -307,7 +289,6 @@ class IsolateChip extends MetadataChip {
super.key,
required String name,
required String? id,
required super.maxWidth,
super.backgroundColor,
super.foregroundColor,
super.outlined = false,
Expand All @@ -319,7 +300,6 @@ class ZoneChip extends MetadataChip {
super.key,
required String name,
required int? identityHashCode,
required super.maxWidth,
super.backgroundColor,
super.foregroundColor,
super.outlined = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,14 +456,8 @@ class HttpRequestCookiesView extends StatelessWidget {
label: Expanded(
child: Text(
title,
// TODO(kenz): use top level overflow parameter if
// https://github.com/flutter/flutter/issues/82722 is fixed.
// TODO(kenz): add overflow after flutter 2.3.0 is stable. It was
// added in commit 65388ee2eeaf0d2cf087eaa4a325e3689020c46a.
// style: theme.textTheme.titleMedium.copyWith(
// overflow: TextOverflow.fade,
// ),
style: theme.textTheme.titleMedium,
overflow: TextOverflow.ellipsis,
),
),
numeric: numeric,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,11 @@ class NetworkRequestsTable extends StatelessWidget {
Widget build(BuildContext context) {
return RoundedOutlinedBorder(
clip: true,
// TODO(kenz): use SearchableFlatTable instead.
child: FlatTable<NetworkRequest?>(
keyFactory: (NetworkRequest? data) => ValueKey<NetworkRequest?>(data),
child: SearchableFlatTable<NetworkRequest>(
searchController: networkController,
keyFactory: (NetworkRequest data) => ValueKey<NetworkRequest>(data),
data: requests,
dataKey: 'network-requests',
searchMatchesNotifier: searchMatchesNotifier,
activeSearchMatchNotifier: activeSearchMatchNotifier,
autoScrollContent: true,
columns: columns,
selectionNotifier: networkController.selectedRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,7 @@ class TimelineEventsController extends PerformanceFeatureController
// iOS: "io.flutter.1.raster (12651)"
// Linux, Windows, Dream (g3): "io.flutter.raster (12651)"
// MacOS: Does not exist
// Also look for .gpu here for older versions of Flutter.
// TODO(kenz): remove check for .gpu name in April 2021.
if (name.contains(rasterThreadSuffix) || name.contains(gpuThreadSuffix)) {
if (name.contains(rasterThreadSuffix)) {
rasterTrackId = id;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,22 @@ class ProfilerScreenControls extends StatelessWidget {

@override
Widget build(BuildContext context) {
// TODO(kenz): use the [OfflineAwareControls] helper widget.
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
if (offline)
Padding(
padding: const EdgeInsets.only(right: defaultSpacing),
child: ExitOfflineButton(gaScreen: gac.cpuProfiler),
)
else ...[
_PrimaryControls(controller: controller, recording: recording),
const SizedBox(width: defaultSpacing),
_SecondaryControls(
controller: controller,
profilerBusy: recording || processing,
),
],
],
return OfflineAwareControls(
gaScreen: gac.cpuProfiler,
controlsBuilder: (offline) {
if (offline) return const SizedBox.shrink();
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_PrimaryControls(controller: controller, recording: recording),
const SizedBox(width: defaultSpacing),
_SecondaryControls(
controller: controller,
profilerBusy: recording || processing,
),
],
);
},
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import '../ui/icons.dart';

final _log = Logger('screen.dart');

// TODO(kenz): use correct assets.
enum ScreenMetaData {
home(
'home',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright 2025 The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
//
// Generated file. Do not edit.
//
Expand Down
72 changes: 0 additions & 72 deletions packages/devtools_app/test/legacy_integration_tests/app.dart

This file was deleted.

Loading
Loading