Skip to content

Conversation

@polina-c
Copy link
Contributor

@polina-c polina-c commented Dec 24, 2022

RELEASE_NOTE_EXCEPTION=[no functional changes]

@polina-c polina-c changed the title Console1 2 Move console related code from debugger and inspector screens to shared/console. Dec 24, 2022
@polina-c polina-c changed the title Move console related code from debugger and inspector screens to shared/console. Move some console related code from debugger and inspector screens to shared/console. Dec 24, 2022
@polina-c polina-c changed the title Move some console related code from debugger and inspector screens to shared/console. Move console related code from debugger and inspector screens to shared/console. Dec 24, 2022
@polina-c polina-c marked this pull request as ready for review December 24, 2022 21:14
@polina-c polina-c requested a review from jacob314 December 24, 2022 21:14
@polina-c polina-c changed the title Move console related code from debugger and inspector screens to shared/console. Move some console related code from debugger and inspector screens to shared/console. Dec 24, 2022
import 'dart:developer';

import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has a lot of non-console stuff in it. I would suggest either leaving it in the inspector and accepting slightly tangled imports or move it to a shared directory. Seems odd to have this core inspector logic under the console rather than inspector or shared.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in #5006.

@@ -255,7 +250,7 @@ class DiagnosticsNodeDescription extends StatelessWidget {
final defaultStyle = DefaultTextStyle.of(context).style;
final baseStyle = style ?? defaultStyle;
TextStyle textStyle = baseStyle.merge(
inspector_text_styles.textStyleForLevel(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems a bit inverted. these are much more inspector specific styles than console styles. If you want a neutral name, these could be diagnostics_text_styles.

Copy link
Contributor Author

@polina-c polina-c Jan 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed and moved in #5021

@@ -1,20 +1,19 @@
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also isn't a console thing. If you want to move it, it should go in shared not console.


import '../../theme.dart';

// Enum-like static classes are ok.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not continue the previous pattern of top level members imported with a prefix? In general if we were to use one pattern I would think we would migrate to that pattern not to this pattern that violates the lints we have enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline and agreed enum-like static classes are more convenient than top level members.

Copy link
Contributor

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
LGTM as long as there is a cleanup CL after the 3 chained CLs are landed moving things to a common dir.

@polina-c polina-c merged commit 96a3e95 into flutter:master Dec 27, 2022
@polina-c polina-c deleted the console1-2 branch December 27, 2022 17:31
@CoderDake CoderDake mentioned this pull request Jan 24, 2023
7 tasks
@DartDevtoolWorkflowBot DartDevtoolWorkflowBot mentioned this pull request Jan 24, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants