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

[Proposal] - flutter_html Contrib #323

Closed
ryan-berger opened this issue Jun 13, 2020 · 5 comments · Fixed by #661
Closed

[Proposal] - flutter_html Contrib #323

ryan-berger opened this issue Jun 13, 2020 · 5 comments · Fixed by #661

Comments

@ryan-berger
Copy link
Collaborator

Hello All,

Recently due to the 1.0.0 release I have received a recent influx of issues. Keep them coming! I am personally very busy as I'm working two jobs and will be headed back to college in a few months, so I may not get to them as fast as you may like, but I can definitely review pull requests when I have the time, so the best way to get your issue fixed is to submit a pull and I can take a look. Now, to the title of the issue.

Before @Sub6Resources left to go on a 2 year trip abroad, we had a discussion of a flutter_html_lite library that had very basic support for the very basic rendering of html, with little to no customization, and keeping this as a fork or using it as a dependency. This still may be happening with me at the helm, so keep watching for an announcement for it. Recently, however, I think that I've realized we may want to go the opposite direction as well. I want to make things more feature packed/complicated!

I know that sounds crazy, but let me explain. I've noticed throughout all the many issues that you all have submitted, that, although there are some annoying features that are missing, or limitations of the library that are hard to deal with, a lot of issues can be solved by registering customRenderer. But I get it! That's annoying!

So, here's my proposal:

I propose that flutter_html gets a sister library named something like flutter_html_contrib where we hold a carefully crafted and curated collection of widgets ready to be used as a customRenderer. It can allow flutter_html to stay simple and limited in its featureset, but still allow everyone to extend it to the many different use cases that you all have because it sure is hard to keep up with all of them and make sure that flutter_html is a cohesive library!

I would really like everybody's feedback on this. What do you think are the costs and benefits of the decision? Would you rather see features added instead of making any headway with this library? If we decide we want to do it, would you want me to find an extra maintainer!

Discuss away!

@ryan-berger ryan-berger pinned this issue Jun 13, 2020
@hey24sheep
Copy link
Contributor

Hi @ryan-berger
My feedback on this would be. To add features or even custom renderer to this library.

But, here are some other alternatives I think of :

  • Could divide it into modules like HTMLParser -> Lite -> Full Features
  • Could extend this library with flutter_html_extended having Custom Renderer and other features that way we could leave this library intact.

But, this would make other people angry. Personally, I would be a lil furious too cuz my boss made me use this library and he would want me to port code to extended version in future. To overcome this issue, I would suggest extend to have original code intact + HtmlExtended(....) this way, we can just swap libraries in pubspec without porting or creating dupes

@erickok
Copy link
Collaborator

erickok commented Jun 15, 2020

Issues such as #324 show that there is certainly a good opportunity for have is lighter base library, and having a richer, full featured experience as opt-in. Ideally you would not do that as separate plugin, but via extensions (which might be combined into a -contrib project). For example, by default the is good video tag support, but an official custom renderer is available for this (which would use a relatively heavy dependency). Those can be grouped in a -contrib but even better if they are all individual.

So I wouldn't make a stand alone light plugin, but have the base implement only essentials and support (many) more tags/styles/features via custom renderers.

@davidmartos96
Copy link

I think this proposal would be great. My use case for using this library is a basic rendering of bold, italic and normal text that I read from a RSS feed. I'm currently hard constraining my project to version 0.11.1 just for that reason.
I'm pretty sure that many other use cases just care about a small subset of features.
Great work on the project!

@hey24sheep
Copy link
Contributor

Also, looking at recent Flutter update and PRs we should get some active maintainers. A lot of approved PRs are pending.

@PhilDevs94
Copy link

Well I think still some basic tag need to be released soon such as <iframe>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants