Skip to content

Combine resume / pause buttons in the debugger controls - #8858

Closed
bwilkerson wants to merge 3 commits into
masterfrom
combine-pause-and-resume
Closed

bwilkerson wants to merge 3 commits into
masterfrom
combine-pause-and-resume

Conversation

@bwilkerson

Copy link
Copy Markdown

This fixes #4924 by showing only one button at any given time.

@bwilkerson
bwilkerson requested a review from elliette as a code owner February 5, 2025 23:12
@bwilkerson
bwilkerson requested a review from a team as a code owner February 5, 2025 23:20
[#8849](https://github.com/flutter/devtools/pull/8849)
* Either the 'pause' or the 'resume' buttons is displayed,
never both. -
[#4924](https://github.com/flutter/devtools/issues/4924)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: Please link the PR instead of the issue that this fixes.
Uber nit on verbiage: entries should be phrased in the past tense (e.g. "Added XYZ" instead of "Add XYZ").

@kenzieschmoll kenzieschmoll left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM with a nit on the release note entry to match the preferred style laid out in the release notes README.md

@@ -93,27 +93,27 @@ class _DebuggingControlsState extends State<DebuggingControls>
final isSystemIsolate = controller.isSystemIsolate;
return RoundedButtonGroup(

@elliette elliette Feb 5, 2025 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Now that we only have one item in items, I don't think we need the RoundedButtonGroup (since it's intended for a group of buttons). I think we probably want to use DevToolButton here (though we might need to add a rounded option which would match the UI of `RoundedButtonGroup). Adding @kenzieschmoll if she has other thoughts!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1 we can use DevToolsButton instead. One clean up could be to change this method to return a ternary:

return isPaused ? DevToolsButton(...) : DevToolsButton(...);;

@kenzieschmoll

Copy link
Copy Markdown
Member

Looks like there are also some failing tests that need to be updated: debugger_screen_test.dart

@bwilkerson

Copy link
Copy Markdown
Author

Thanks for the feedback. The test failure is probably more than I can do in a codespace, so if one of you wants to finish this off I'm fine with that. Otherwise I'll just close it without merging it.

@kenzieschmoll

Copy link
Copy Markdown
Member

closing in favor of #9095

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.

Combine resume / pause to one button to save screen space.

3 participants