Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate CustomRender to HtmlExtension #1176

Merged
merged 31 commits into from
May 13, 2023
Merged

Migrate CustomRender to HtmlExtension #1176

merged 31 commits into from
May 13, 2023

Conversation

Sub6Resources
Copy link
Owner

@Sub6Resources Sub6Resources commented Oct 21, 2022

Closes #1142

Getting started on this. Here's a task list for myself. Any additional feedback/suggestions are still welcome.

  • Write HtmlExtension class
  • Write ExtensionContext class
  • Integrate HtmlExtension into the Html widget flow
  • Write TagExtension helper class
  • Write MatcherExtension helper class
  • Rewrite flutter_html_audio to use HtmlExtension
  • Rewrite flutter_html_iframe to use HtmlExtension
  • Rewrite flutter_html_math to use HtmlExtension
  • Rewrite flutter_html_svg to use HtmlExtension
  • Rewrite flutter_html_table to use HtmlExtension
  • Rewrite flutter_html_video to use HtmlExtension
  • Write ImageExtension class
  • Bump version to 3.0.0-beta.1
  • Add migration guide
  • Add better documentation for HtmlExtension

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

Fixes #1206. Fixes #1199. Fixes #1180. Fixes #1113

@Sub6Resources Sub6Resources added this to the 3.0.0 milestone Oct 21, 2022
@Sub6Resources Sub6Resources self-assigned this Oct 21, 2022
@Sub6Resources Sub6Resources changed the title Migrate CustomRender to Extension WIP: Migrate CustomRender to Extension Oct 21, 2022
@codecov
Copy link

codecov bot commented Oct 21, 2022

Codecov Report

Patch coverage: 77.09% and project coverage change: +5.76 🎉

Comparison is base (c75e0df) 51.40% compared to head (3ed46cf) 57.16%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1176      +/-   ##
==========================================
+ Coverage   51.40%   57.16%   +5.76%     
==========================================
  Files          19       36      +17     
  Lines        2640     2610      -30     
==========================================
+ Hits         1357     1492     +135     
+ Misses       1283     1118     -165     
Impacted Files Coverage Δ
lib/src/anchor.dart 66.66% <ø> (ø)
lib/src/extension/helpers/image_extension.dart 0.00% <0.00%> (ø)
lib/src/extension/helpers/image_tap_extension.dart 0.00% <0.00%> (ø)
lib/src/style.dart 84.87% <0.00%> (ø)
lib/src/utils.dart 77.27% <ø> (ø)
lib/src/builtins/details_element_builtin.dart 11.11% <11.11%> (ø)
lib/src/tree/styled_element.dart 23.68% <23.68%> (ø)
lib/src/extension/helpers/matcher_extension.dart 53.84% <53.84%> (ø)
lib/src/builtins/interactive_element_builtin.dart 54.76% <54.76%> (ø)
lib/src/extension/extension_context.dart 55.17% <55.17%> (ø)
... and 20 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@PritamSangani
Copy link

Hi @Sub6Resources - is there anything the community can do to help get this PR finished and a new major version released?

@Sub6Resources
Copy link
Owner Author

Continuing from #1153

@Sub6Resources Sub6Resources changed the title WIP: Migrate CustomRender to Extension Migrate CustomRender to Extension May 9, 2023
@Sub6Resources
Copy link
Owner Author

Sub6Resources commented May 9, 2023

Migrating to Extension has touched pretty much all of the codebase, so I've taken the opportunity to remove some technical debt and fix bugs as I found them.

Here's a summary of major changes in this PR so far (this list is a work in progress):

@Sub6Resources Sub6Resources marked this pull request as ready for review May 12, 2023 17:00
@Sub6Resources
Copy link
Owner Author

This pull request is ready. Just needs some additional documentation on the Wiki. Anybody that's just stopping in, please review! I'd love to get this release out sometime tomorrow!

example/lib/main.dart Outdated Show resolved Hide resolved
lib/flutter_html.dart Outdated Show resolved Hide resolved
lib/flutter_html.dart Outdated Show resolved Hide resolved
lib/flutter_html.dart Outdated Show resolved Hide resolved
@PritamSangani
Copy link

There was a comment made on the initial extension api RFC issue about the name of the api, with Extension potentially being confusing and leading to conflicts with it being quite generic. A suggestion was made to change to something like HtmlExtension. I was wondering if you had any thoughts on this.

re: #1142 (comment)

@Sub6Resources
Copy link
Owner Author

@PritamSangani Thanks for pointing that out. I had forgotten about that comment (although I had named all the extension packages as if I had already made the change -- IframeHtmlExtension for example).

I agree! Just updated from Extension to HtmlExtension

@Sub6Resources Sub6Resources changed the title Migrate CustomRender to Extension Migrate CustomRender to HtmlExtension May 13, 2023
@Sub6Resources Sub6Resources merged commit 8ac444b into master May 13, 2023
@Sub6Resources Sub6Resources deleted the feat/extension branch May 13, 2023 18:09
@Sembauke
Copy link

congrats 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment