Sub6Resources / flutter_html

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)
https://pub.dev/packages/flutter_html
MIT License
1.79k stars 860 forks source link

fix: Fix issue with font scaling introduced in 3.0.0-alpha.6 #1173

Closed Sub6Resources closed 1 year ago

Sub6Resources commented 1 year ago

Fixes #1170

I inadvertently used Text.rich, which doesn't handle accessibility or font scaling very well, instead of RichText in CssBoxWidget. This reverts that issue.

codecov[bot] commented 1 year ago

Codecov Report

Base: 51.41% // Head: 49.68% // Decreases project coverage by -1.73% :warning:

Coverage data is based on head (1802309) compared to base (6571e3b). Patch coverage: 100.00% of modified lines in pull request are covered.

:exclamation: Current head 1802309 differs from pull request most recent head 1ed9643. Consider uploading reports for the commit 1ed9643 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1173 +/- ## ========================================== - Coverage 51.41% 49.68% -1.74% ========================================== Files 19 18 -1 Lines 2641 2681 +40 ========================================== - Hits 1358 1332 -26 - Misses 1283 1349 +66 ``` | [Impacted Files](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker) | Coverage Δ | | |---|---|---| | [lib/src/style/fontsize.dart](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1173/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker#diff-bGliL3NyYy9zdHlsZS9mb250c2l6ZS5kYXJ0) | `56.25% <ø> (ø)` | | | [lib/src/css\_box\_widget.dart](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1173/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker#diff-bGliL3NyYy9jc3NfYm94X3dpZGdldC5kYXJ0) | `64.33% <100.00%> (+0.05%)` | :arrow_up: | | [lib/html\_parser.dart](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1173/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker#diff-bGliL2h0bWxfcGFyc2VyLmRhcnQ=) | `73.34% <0.00%> (-10.62%)` | :arrow_down: | | [lib/src/styled\_element.dart](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1173/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker#diff-bGliL3NyYy9zdHlsZWRfZWxlbWVudC5kYXJ0) | `79.14% <0.00%> (-1.07%)` | :arrow_down: | | [lib/style.dart](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1173/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker#diff-bGliL3N0eWxlLmRhcnQ=) | `84.77% <0.00%> (-0.60%)` | :arrow_down: | | [lib/src/css\_parser.dart](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1173/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker#diff-bGliL3NyYy9jc3NfcGFyc2VyLmRhcnQ=) | `13.64% <0.00%> (-0.20%)` | :arrow_down: | | [lib/src/style/marker.dart](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1173/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker#diff-bGliL3NyYy9zdHlsZS9tYXJrZXIuZGFydA==) | | | | [lib/custom\_render.dart](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1173/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker#diff-bGliL2N1c3RvbV9yZW5kZXIuZGFydA==) | `51.57% <0.00%> (+0.61%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

erickok commented 1 year ago

This is really unexpected to me... But glad it got fixed.

kbosselmansh commented 1 year ago

@Sub6Resources Is there a plan to push a new alpha release with this fix (3.0.0-alpha.7??)

Sub6Resources commented 1 year ago

@kbosselmansh Watch for 3.0.0-beta.1, coming hopefully before the end of the week.