Skip to content

Add width constraints for FlexibleSpaceBar.title in its expanded state, so that overflow of long titles can be handled#51335

Merged
fluttergithubbot merged 6 commits intoflutter:masterfrom
perclasson:ensure_that_title_does_not_overflow
Mar 9, 2020
Merged

Add width constraints for FlexibleSpaceBar.title in its expanded state, so that overflow of long titles can be handled#51335
fluttergithubbot merged 6 commits intoflutter:masterfrom
perclasson:ensure_that_title_does_not_overflow

Conversation

@perclasson
Copy link
Copy Markdown
Contributor

@perclasson perclasson commented Feb 24, 2020

Add width constraints for FlexibleSpaceBar.title in its expanded state, so that overflow of long titles can be handled.

See this dartpad for reproducible example of the issue.

Description

Add width constraints for FlexibleSpaceBar.title in its expanded state, so that overflow of long titles can be handled.

Before:

After:

Example with larger text scale factor:

Related Issues

Closes #14227

Tests

I added the following tests:

  • FlexibleSpaceBar sets width constraints for the title

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.
    • I wrote a design doc: https://flutter.dev/go/template Replace this with a link to your design doc's short link
    • I got input from the developer relations team, specifically from: Replace with the names of who gave advice
    • I wrote a migration guide: Replace with a link to your migration guide

@fluttergithubbot fluttergithubbot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Feb 24, 2020
@fluttergithubbot
Copy link
Copy Markdown
Contributor

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@perclasson perclasson force-pushed the ensure_that_title_does_not_overflow branch 2 times, most recently from a4d256e to efb2e18 Compare February 24, 2020 16:06
Comment thread packages/flutter/test/material/flexible_space_bar_test.dart Outdated
@pennzht
Copy link
Copy Markdown
Member

pennzht commented Feb 25, 2020

You can add a code snippet to the PR description to clarify what issue is being solved.

@googlebot
Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@perclasson perclasson force-pushed the ensure_that_title_does_not_overflow branch from 07090b8 to a05c7a1 Compare February 25, 2020 12:12
@googlebot
Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

Copy link
Copy Markdown
Contributor

@rami-a rami-a left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread packages/flutter/test/material/flexible_space_bar_test.dart Outdated
Comment thread packages/flutter/test/material/flexible_space_bar_test.dart Outdated
Comment thread packages/flutter/test/material/flexible_space_bar_test.dart Outdated
@perclasson perclasson force-pushed the ensure_that_title_does_not_overflow branch from a05c7a1 to 9a9e6aa Compare March 9, 2020 09:51
@perclasson perclasson force-pushed the ensure_that_title_does_not_overflow branch from 9a9e6aa to ba83af1 Compare March 9, 2020 09:57
Copy link
Copy Markdown
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread packages/flutter/test/material/flexible_space_bar_test.dart
Comment thread packages/flutter/test/material/flexible_space_bar_test.dart Outdated
@fluttergithubbot fluttergithubbot merged commit 1546f41 into flutter:master Mar 9, 2020
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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.

FlexibleSpaceBar title overflows on top of AppBar actions

6 participants