Skip to content

fix: resolve 8 bugs + bump version to 1.2.2#6

Merged
vietnguyentuan2019 merged 9 commits intomainfrom
bugfix/issue5
Apr 2, 2026
Merged

fix: resolve 8 bugs + bump version to 1.2.2#6
vietnguyentuan2019 merged 9 commits intomainfrom
bugfix/issue5

Conversation

@vietnguyentuan2019
Copy link
Copy Markdown
Contributor

Summary

  • Android build fix (Android build fails with modern compileSdk #5): irondash_engine_context 0.5.5 (compileSdk=31) conflicts with androidx.fragment:1.7.1 (minCompileSdk=34) — added subprojects { compileSdk = 35 } override in example/android/build.gradle.kts
  • SVG invisible with sanitize: true: Added atomic SVG sanitization that preserves structure while stripping <script> and dangerous attributes
  • HyperRenderConfig identity-compare bug: Added operator== / hashCode — prevents unnecessary re-layouts when _effectiveConfig creates new object for @keyframes docs
  • selectable toggle ignored: didUpdateWidget now creates/disposes VirtualizedSelectionController correctly
  • Deep-link taps silently blocked: _safeOnLinkTap now consults both allowedCustomSchemes and renderConfig.extraLinkSchemes
  • CSS change bypassed section cache: _sectionHashes reset in didUpdateWidget when customCss changes
  • Markdown/Delta virtualized as single section: Added _splitIntoSections() — large Markdown/Delta docs now chunk properly in virtualized/paged mode
  • renderConfig partial change detection: didUpdateWidget uses full value equality instead of only virtualizationChunkSize
  • CSS float class names not detected: _containsFloatChild now recognises Bootstrap/Tailwind patterns (float-left, pull-right, alignleft, etc.)

Test plan

  • dart analyze --fatal-infos — no issues
  • dart format — no diff
  • 809 tests passed locally (flutter test --no-pub)
  • CI green on PR

Android build (#5):
- Add subprojects compileSdk=35 override in example/android/build.gradle.kts
  to fix irondash_engine_context vs androidx.fragment:1.7.1 mismatch

SVG invisible with sanitize:true (html_sanitizer.dart):
- Add atomic SVG sanitization path (_sanitizeSvgElement, _sanitizeSvgAttributes)
  preserving structural elements while stripping scripts/dangerous attrs

HyperRenderConfig equality (hyper_render_config.dart):
- Add operator== and hashCode to prevent identity-compare re-layouts on
  every frame when _effectiveConfig merges keyframes into a new object

selectable toggle ignored after build (hyper_viewer.dart):
- Create/dispose VirtualizedSelectionController in didUpdateWidget when
  selectable prop changes

Deep-link tap silently blocked (hyper_viewer.dart):
- _safeOnLinkTap now checks both allowedCustomSchemes AND
  renderConfig.extraLinkSchemes

CSS change did not invalidate section cache (hyper_viewer.dart):
- Reset _sectionHashes in didUpdateWidget when customCss changes

Markdown/Delta single-section in virtualized/paged mode (hyper_viewer.dart):
- Add _splitIntoSections() helper; sync fallback now chunks at block boundaries

renderConfig change only partially detected (hyper_viewer.dart):
- didUpdateWidget uses full renderConfig != instead of only virtualizationChunkSize

CSS float class names not detected (html_adapter.dart):
- _containsFloatChild now recognises Bootstrap/Tailwind float class patterns

Misc:
- Fix unused element _containsPositionAbsoluteOrFixed in html_heuristics.dart
- Add .pubignore entries for archive/, coverage/, .metadata, pubspec_dev.yaml
- dart format all changed files
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

✅ Layout Regression — All fixtures within 60 FPS budget

Fixture Budget (ms) Median (ms) P95 (ms)
simple_paragraph 8 16 17
mixed_inline 10 15 16
float_layout 12 17 25
table_20_rows 14 36 44
cjk_ruby 14 11 12
large_article 16 44 49

One or more fixtures exceeded the 16 ms budget.

Flutter 3.41.5 · ubuntu-22.04

No action required.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

✅ Layout Regression — All fixtures within 60 FPS budget

Fixture Budget (ms) Median (ms) P95 (ms)
simple_paragraph 8 18 21
mixed_inline 10 15 16
float_layout 12 19 28
table_20_rows 14 46 56
cjk_ruby 14 12 15
large_article 16 50 55

One or more fixtures exceeded the 16 ms budget.

Flutter 3.41.5 · ubuntu-22.04

No action required.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

❌ Visual Regression Detected

23 golden test(s) failed on Flutter 3.41.5 / ubuntu-22.04.

The rendered output no longer matches the reference images.

If the change is intentional, regenerate the goldens on the
same platform via the Update Goldens workflow dispatch, or run
locally in Docker:

docker run --rm \
  -v $(pwd):/workspace -w /workspace \
  ghcr.io/cirruslabs/flutter:3.41.5 \
  bash -c "apt-get update -qq && \
    apt-get install -y fonts-noto fonts-noto-cjk fonts-roboto && \
    flutter pub get && \
    flutter test test/golden/ --update-goldens"
git add test/golden/goldens/
git commit -m "chore: update golden references (Flutter 3.41.5)"

⚠️ Always regenerate goldens on ubuntu-22.04 with Flutter
3.41.5
to keep references pixel-stable across machines.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

✅ Layout Regression — All fixtures within 60 FPS budget

Fixture Budget (ms) Median (ms) P95 (ms)
simple_paragraph 8 18 21
mixed_inline 10 16 20
float_layout 12 19 28
table_20_rows 14 42 50
cjk_ruby 14 10 12
large_article 16 51 55

One or more fixtures exceeded the 16 ms budget.

Flutter 3.41.5 · ubuntu-22.04

No action required.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

✅ Layout Regression — All fixtures within 60 FPS budget

Fixture Budget (ms) Median (ms) P95 (ms)
simple_paragraph 8 17 20
mixed_inline 10 18 20
float_layout 12 19 31
table_20_rows 14 42 56
cjk_ruby 14 11 12
large_article 16 50 55

One or more fixtures exceeded the 16 ms budget.

Flutter 3.41.5 · ubuntu-22.04

No action required.

@vietnguyentuan2019 vietnguyentuan2019 merged commit ff99674 into main Apr 2, 2026
8 checks passed
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 this pull request may close these issues.

1 participant