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

[Inspector V2] Enable Inspector V2 by default #8650

Merged
merged 12 commits into from
Jan 6, 2025

Conversation

elliette
Copy link
Member

@elliette elliette commented Dec 20, 2024

This PR:

  • enables inspector V2 by default
  • hides the inspector V2 switch from the Inspector controls
  • moves the setting to disable Inspector V2 from the general settings to the inspector settings
  • shows a welcome banner the first time the user loads the new inspector

Note: Making this a banner and not a notification because I found a bug with our notification service: #8651

Screenshot 2024-12-20 at 12 28 31 PM Screenshot 2024-12-20 at 12 17 52 PM

@elliette elliette requested a review from a team as a code owner December 20, 2024 20:29
@elliette elliette requested review from kenzieschmoll and removed request for a team December 20, 2024 20:29
valueListenable: preferences.inspector.inspectorV2Enabled,
builder: (context, v2Enabled, _) {
valueListenable: preferences.inspector.legacyInspectorEnabled,
builder: (context, legacyInspectorEnabled, _) {
Copy link
Member

Choose a reason for hiding this comment

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

if legacyInspectorEnabled is not used, we should use an underscore instead _

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, done!

Comment on lines 34 to 36
// TODO(https://github.com/flutter/devtools/issues/1423): Default to true
// after verifying auto-refreshes are performant.
final _autoRefreshEnabled = ValueNotifier<bool>(true);
Copy link
Member

Choose a reason for hiding this comment

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

do we still need this todo? It looks like we are already defaulting to true

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah forgot to delete that TODO when I switched auto-refresh on. I've removed it.

Future<void> _initInspectorV2Enabled() async {
await _updateInspectorV2Enabled();
Future<void> _initLegacyInspectorEnabled() async {
await _updateLegacyInspectorEnabled();
Copy link
Member

Choose a reason for hiding this comment

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

should remove the old 'inspector.inspectorV2Enabled' key as part of initializing the legacy enabled key?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've opened up a bug for that: #8667

We need to add functionality to remove storage keys, which I would like to do in a separate PR. For now, this means that inspector.inspectorV2Enabled will be stored in the browser storage, but we aren't reading it so it shouldn't have any impact.

@elliette elliette merged commit b5a66f1 into flutter:master Jan 6, 2025
24 checks passed
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