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

breaking: Remove SelectableHtml #1153

Closed Sub6Resources closed 1 year ago

Sub6Resources commented 1 year ago

This should resolve a few issues regarding the SelectableHtml/Html feature parity. Users can achieve a much cleaner result by using a SelectionArea widget to wrap Html.

Fixes #1137 Closes #717 Closes #1134 Closes #1105

Sub6Resources commented 1 year ago

@erickok have you had a chance to look at this PR?

erickok commented 1 year ago

To be honest, since we're still trying to get a 3.0 ready, breaking the API big time, I'd get rid of the limited SelectableHtml entirely. Deprecations are nice in minor releases and are developer friendly, but we have a clean, superior and 'free' alternative.

Sub6Resources commented 1 year ago

That works for me! I'll get this updated sometime today

codecov[bot] commented 1 year ago

Codecov Report

Base: 51.40% // Head: 51.07% // Decreases project coverage by -0.32% :warning:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1153 +/- ## ========================================== - Coverage 51.40% 51.07% -0.33% ========================================== Files 19 19 Lines 2640 2561 -79 ========================================== - Hits 1357 1308 -49 + Misses 1283 1253 -30 ``` | [Impacted Files](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1153?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker) | Coverage Δ | | |---|---|---| | [lib/custom\_render.dart](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1153/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker#diff-bGliL2N1c3RvbV9yZW5kZXIuZGFydA==) | `53.02% <ø> (+2.05%)` | :arrow_up: | | [lib/flutter\_html.dart](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1153/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker#diff-bGliL2ZsdXR0ZXJfaHRtbC5kYXJ0) | `65.30% <ø> (-4.02%)` | :arrow_down: | | [lib/html\_parser.dart](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1153/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker#diff-bGliL2h0bWxfcGFyc2VyLmRhcnQ=) | `84.98% <ø> (+1.01%)` | :arrow_up: | | [lib/src/css\_box\_widget.dart](https://codecov.io/gh/Sub6Resources/flutter_html/pull/1153/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Whitaker#diff-bGliL3NyYy9jc3NfYm94X3dpZGdldC5kYXJ0) | `63.17% <100.00%> (-1.00%)` | :arrow_down: | 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.

Sub6Resources commented 1 year ago

@erickok. It's all removed!

Sub6Resources commented 1 year ago

As I've been (finally) working at the migration from customRender to Extension, I ended up touching a lot of the same code as this pull request. As such, I decided to just include all the changes from this PR into the other branch manually rather than resolving massive merge conflicts after the fact. That said, I'm going to close this PR, with the changes continuing on into #1176. I'll push the changes to that PR in a few hours.