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

Lists not handled correctly [1.0.0] #106

Closed
Sub6Resources opened this issue Jun 8, 2019 · 7 comments · Fixed by #122
Closed

Lists not handled correctly [1.0.0] #106

Sub6Resources opened this issue Jun 8, 2019 · 7 comments · Fixed by #122
Assignees
Milestone

Comments

@Sub6Resources
Copy link
Owner

NOTE: This is an issue with code that hasn't been released yet.

List items with content that wraps wraps so that it places content underneath the list character, rather than to the right of the list character. Additionally, ol list characters should not affect the left margin of the list item's content.

@Sub6Resources Sub6Resources added this to the 1.0.0 milestone Jun 8, 2019
@Sub6Resources Sub6Resources self-assigned this Jun 8, 2019
@SvenSchoene
Copy link

First of all: this library works great so far!

However, we have a pretty list-heavy webpage to display and this issue kills the layout.
Do you have any idea when you'll get around to dealing with this?

@Sub6Resources
Copy link
Owner Author

Which version of flutter_html are you on. Also, what specific issues are you seeing with the layout?

@SvenSchoene
Copy link

SvenSchoene commented Jun 28, 2019

We are using flutter_html: ^0.10.4.

Here's some HTML and two screenshots, one with useRichText enabled, and one with it being disabled.

The code is not pretty, but it's autogenerated, so I'm not that flexible.

The obvious alternative here is to switch to a "real" webview. However, one of my colleagues implemented this with flutter_html and I'm surprised by how good the result is. If the spacing issue would be gone there'd be absolutely no reason to use a webview.

<div id="iubenda_policy" class="iubenda_fluid_policy iubenda_embed_policy ">
  <div id="wbars_all">
    <div class="iub_container iub_base_container">
      <div id="wbars">
        <div class="iub_content legal_pp">
          <div class="iub_header">
            <h1>Privacy Policy of <strong>xxxxxxxx</strong></h1>
            <p>This Application collects some Personal Data from its Users.</p>
          </div> <!-- /header -->
          <div class="simple_pp">
            <div class="one_line_col">
              <h2 style="text-align: center; font-variant:small-caps;">Policy summary</h2>
            </div> <!-- /one_line_col -->
            <h2 id="purposes_data">Personal Data collected for the following purposes and using the following
              services:</h2>
            <ul class="for_boxes cf">
              <li class="one_line_col">
                <ul class="for_boxes">
                  <li>
                    <div class="iconed policyicon_purpose_5">
                      <h3>Analytics</h3>
                      <ul class="unstyled">
                        <li>
                          <h3>Google Analytics for Firebase</h3>
                          <p>Personal Data: Application opens; Application updates; Cookies; device information; first
                            launches; geography/region; In-app purchases; number of sessions; number of Users ;
                            operating systems; session duration; unique device identifiers for advertising (Google
                            Advertiser ID or IDFA, for example); Usage Data</p>
                        </li>
                        <li>
                          <h3>Google Analytics</h3>
                          <p>Personal Data: Cookies; Usage Data</p>
                        </li>
                      </ul>
                    </div>
                  </li>
                  <li>
                    <div class="iconed policyicon_purpose_17">
                      <h3>Location-based interactions</h3>
                      <ul class="unstyled">
                        <li>
                          <h3>Non-continuous geolocation</h3>
                          <p>Personal Data: geographic position</p>
                        </li>
                      </ul>
                    </div>
                  </li>
...

useRichText enabled:
Screenshot_1561629737

useRichText disabled:
Screenshot_1561692401

@Sub6Resources
Copy link
Owner Author

There's going to be a pretty big change in the way the package parses the html in version 1.0.0 of flutter_html. The changes being made rely on some changes in the flutter framework that haven't yet reached the stable channel, so I'm waiting to release version 1.0.0 until the framework changes are pushed to the stable channel (which should be in the late summer or early fall if Flutter follows the usual release schedule).

The fixes for lists probably won't be released until 1.0.0 is released. I'll be releasing some preview builds of 1.0.0 in the next month or so that contain those fixes if you're willing to switch to a less stable Flutter release channel (currently the dev channel), but I understand this isn't great for a production app, so you're best bet now is probably to use the webview plugin.

@SvenSchoene
Copy link

Thank you for the status update on this.
I'm perfectly happy to both, try out a preview version in a few weeks, as well as wait for the new stable version of Flutter (because maybe we're daring to release a production-app with a non-stable Flutter channel... 😱 We'll see! 😄 )

@samarthagarwal
Copy link

Any way I can get around this issue?

@Sub6Resources
Copy link
Owner Author

This has been fixed in 1.0.0. See #122 for updates on its release.

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

Successfully merging a pull request may close this issue.

3 participants