Skip to content

Debugger: soft wrap console input lines #8855

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

Merged
merged 5 commits into from
Feb 13, 2025

Conversation

srawlins
Copy link
Contributor

@srawlins srawlins commented Feb 5, 2025

See #5505 for original issue screenshot. Here is another:

Screenshot 2025-02-05 at 2 21 39 PM

Afterwards, we get this nice expanding behavior:

Screenshot 2025-02-05 at 2 20 25 PM Screenshot 2025-02-05 at 2 20 46 PM

The console itself is still expandable:

Screenshot 2025-02-05 at 2 20 55 PM

Fixes #5505

@srawlins srawlins requested a review from a team as a code owner February 5, 2025 22:11
@srawlins srawlins requested review from bkonyi and removed request for a team February 5, 2025 22:11
super.key,
}) : searchFieldHeight = searchFieldHeight ?? defaultTextFieldHeight;
}) : searchFieldHeight = searchFieldHeight ?? defaultTextFieldHeight,
_shouldExpandHeight = shouldExpandHeight;
Copy link
Member

Choose a reason for hiding this comment

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

is there a reason this is a private field? Can shouldExpandHeight just be a public field so that we can use this.shouldExpandHeight = true in the constructor parameter?

Copy link
Member

Choose a reason for hiding this comment

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

Also, should the default value be false to match the code below?

Copy link
Member

Choose a reason for hiding this comment

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

See #8855 (comment) before addressing this comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only in order to prefer private fields. https://dart.dev/effective-dart/design#prefer-making-declarations-private

It improves static analysis (like you are told when the field could be final, or is unused). It sends readability signals that the field is not intended to be read or written from outside the library. And the price you pay is that you can't use this. in the constructor parameter.

If there is a style in DevTools that is counter to this Effective Dart guideline, we can document that and prefer public.

Copy link
Member

@kenzieschmoll kenzieschmoll left a comment

Choose a reason for hiding this comment

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

lgtm with a couple comments

@srawlins srawlins merged commit fc96652 into flutter:master Feb 13, 2025
24 checks passed
@srawlins srawlins deleted the expandable-console branch February 13, 2025 01:21
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.

Console input too long causes input to be unreadable
2 participants