Skip to content

Conversation

@bleroux
Copy link
Contributor

@bleroux bleroux commented Oct 9, 2024

Description

This PR improves the InputDecoration.errorMaxLines and InputDecoration.helperMaxLines documentations to explain when wrapping and ellipsing are applied.

Related Issue

Fixes InputDecoration.errorMaxLines's documentation does not match behavior.

@bleroux bleroux requested a review from justinmc October 9, 2024 12:20
@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Oct 9, 2024
Copy link
Contributor

@justinmc justinmc 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 nits 👍

Thanks for actually filing this PR after all the discussion in the issue.

/// Defaults to null, which means that the [helperText] is not limited.
/// Defaults to null, which means that soft line breaks in [helperText] are
/// truncated with an ellipse while hard line breaks are respected.
/// For example, an [helperText] that overflows the width of the field will be
Copy link
Contributor

Choose a reason for hiding this comment

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

"an" => "a"

/// Defaults to null, which means that soft line breaks in [helperText] are
/// truncated with an ellipse while hard line breaks are respected.
/// For example, an [helperText] that overflows the width of the field will be
/// truncated with an ellipse. However, an [helperText] with explicit linebreak
Copy link
Contributor

Choose a reason for hiding this comment

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

"an" => "a"

///
/// To get a long [helperText] wrapping, either set [helperMaxLines] or use
/// [helper] which offers more flexibility, for instance it can be set to a
/// Text widget with a specific overflow value.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Maybe link Text: [Text].

/// truncated with an ellipse. However, an [helperText] with explicit linebreak
/// characters (\n) will display on multiple lines.
///
/// To get a long [helperText] wrapping, either set [helperMaxLines] or use
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, maybe this sounds better: "To get a long [helperText] wrapping" => "To cause a long [helperText] to wrap"

Same for errorText below.

/// characters (\n) will display on multiple lines.
///
/// To get a long [helperText] wrapping, either set [helperMaxLines] or use
/// [helper] which offers more flexibility, for instance it can be set to a
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Just an idea to break up this long sentence: "which offers more flexibility, for instance it can" => "which offers more flexibility. For instance, it can"

Copy link
Contributor

Choose a reason for hiding this comment

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

Same for below as well

@bleroux bleroux force-pushed the improve_InputDecoration_errorMaxLines_documentation branch from 406dc53 to af90bfe Compare October 11, 2024 17:26
@bleroux bleroux added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 11, 2024
@auto-submit auto-submit bot merged commit 9e64b67 into flutter:master Oct 11, 2024
@bleroux bleroux deleted the improve_InputDecoration_errorMaxLines_documentation branch October 12, 2024 13:19
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 13, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 13, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 16, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 17, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InputDecoration.errorMaxLines's documentation does not match behavior

2 participants