- Notifications
You must be signed in to change notification settings - Fork30k
Comments
feat(Tooltip): pass the default text style down the tree#163259
feat(Tooltip): pass the default text style down the tree#163259auto-submit[bot] merged 1 commit intoflutter:masterfrom
Conversation
0eb51fa toca51730Compare
LongCatIsLooong left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The proposal and the implementation make sense to me. Just a few questions regarding the default values.
Uh oh!
There was an error while loading.Please reload this page.
ca51730 to5496f7bCompareLongCatIsLooong commentedFeb 21, 2025
Hmm it looks like the test failures are caused by this change. Could you take a look? |
68c5352 tob99d128Comparekszczek commentedFeb 21, 2025
The |
justinmc left a comment
There was a problem hiding this 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 the PR!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
b99d128 toda21984Comparejustinmc commentedMar 1, 2025
There are Google test failures of two types:
|
kszczek commentedMar 1, 2025
Before this PR, the tooltip's There are two ways we can resolve these failures:
|
LongCatIsLooong commentedMar 3, 2025
This by definition is a breaking change (it affects registered tests). Arguably the tests could have been improved so it does not rely on implementation details but I would recommend avoiding the breaking change for now, by defaulting to As for the failing golden image tests, it could be a flake or it could be a legitimate typeface change introduced by |
7bc7909 to7184bf5Comparekszczek commentedMar 4, 2025
I agree, done!
Unfortunately Google tests are still failing and I'm afraid what you're saying about the typefaces changing might be the case. Would that also be considered a breaking change? |
| onExit: _handleMouseExit, | ||
| decoration: widget.decoration ?? tooltipTheme.decoration ?? defaultDecoration, | ||
| textStyle:widget.textStyle ??tooltipTheme.textStyle ?? defaultTextStyle, | ||
| textStyle:defaultTextStyle.merge(tooltipTheme.textStyle).merge(widget.textStyle), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
could you try(tooltipTheme.textStyle ?? defaultTextStyle).merge(widget.textStyle) and see if it still affects the test images?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Still no luck. It might be best to put the text style merging on hold for now and proceed with just the following change:
child: DefaultTextStyle(- style: Theme.of(context).textTheme.bodyMedium!,+ style: textStyle,+ textAlign: textAlign,
This would resolve the original issue, which was that the default text style didn't reach all the way down to text widgets hidden beneath widget spans.
We can open a separate issue for the breaking change related to text style merging, and later decide whether to proceed with it. What do you think?
7083790 to9b533c5CompareLongCatIsLooong commentedMar 4, 2025
Looks like the tests are passing, thank you for your patience 🙏 |
612d39eUh oh!
There was an error while loading.Please reload this page.
Modify the tooltip's DefaultTextStyle to use the actual default text style picked to fit the current theme and platform instead of hardcoding the bodyMedium text style.
Closes:#163255
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel onDiscord.