Skip to content

release: v1.3.3 — object-fit, CSS attribute selectors, memory-pressure callback, publish tooling#11

Merged
vietnguyentuan2019 merged 1 commit into
mainfrom
feat/v1.3.3-urgent-fixes
Jun 4, 2026
Merged

release: v1.3.3 — object-fit, CSS attribute selectors, memory-pressure callback, publish tooling#11
vietnguyentuan2019 merged 1 commit into
mainfrom
feat/v1.3.3-urgent-fixes

Conversation

@vietnguyentuan2019
Copy link
Copy Markdown
Contributor

Release v1.3.3 — Production Readiness

🚀 Production Readiness

  • Publishing Candidate: Comprehensive code cleanup, removal of unnecessary TODOs, and linting fixes.
  • Test Coverage Verified: Passed 973 test cases covering unit, integration, system, performance, stress, and security testing.
  • Dependency Resolution: Ensured all internal sub-packages (hyper_render_math, etc.) are fully resolved and analyzed.

✨ New CSS Properties

  • object-fit: cover, contain, fill, none, scale-down — applies to <img> elements. Controls how the image content is resized to fit its layout box.
  • CSS Attribute Selectors: Full support for [attr], [attr="val"], [attr^="val"], [attr$="val"], [attr*="val"], [attr~="val"], [attr|="val"] — enables matching on element attributes in custom CSS rules.

✨ New Features

  • onMemoryPressure callback: HyperViewer now exposes an optional VoidCallback? onMemoryPressure parameter (all constructors). Invoked after HyperRender clears its internal caches in response to didHaveMemoryPressure.

🐛 Bug Fixes

  • rgb()/rgba() color parsing: csslib's FunctionTerm.span?.text only covers the argument list — the function name was lost. Fixed by reconstructing the canonical name(args) form from FunctionTerm.text + span?.text.
  • Ref-counted global TextPainter cache: Multiple HyperViewer instances with different textPainterCacheSize no longer clobber each other's cache. Uses ref-counting so the largest requested size is always active.
  • imageConcurrency config wired: HyperRenderConfig.imageConcurrency now actually drives LazyImageQueue.instance.maxConcurrent (was ignored).

🔧 Improvements

  • Float carryover imagePixelOffset: Cross-section float images now carry offset data to avoid re-painting already-visible portions.
  • FloatCarryover value equality: Added proper ==/hashCode for comparison in _onFloatCarryover.
  • HyperAnimationController dispose hardening: Prevents controller double-dispose race conditions.

📱 Example App — Reader Demo Polish

  • Enhanced bookmarking, multi-theme support, Table of Contents panel
  • Smooth page transitions and reading progress indicators

🛠️ Publish Tooling

  • publish.sh simplified: Instead of swapping entire pubspec, now only removes dependency_overrides block before publish — dependencies already have correct version constraints. Restores via git checkout.
  • prepare_publish.sh updated: Same approach — strip dependency_overrides instead of full-file swap.

📝 Documentation

  • ROADMAP: list-style-type, list-style-position marked completed; object-fit moved to Completed
  • COMPARISON_MATRIX, MIGRATION_GUIDE, PERFORMANCE_TUNING updates
  • All 7 sub-package versions bumped to 1.3.3

📦 Packages Updated

Package Version
hyper_render 1.3.3
hyper_render_core 1.3.3
hyper_render_html 1.3.3
hyper_render_markdown 1.3.3
hyper_render_highlight 1.3.3
hyper_render_clipboard 1.3.3
hyper_render_devtools 1.3.3
hyper_render_math 1.3.3

🧪 Test Summary

  • 973 tests passing across all packages
  • New tests: object_fit_test.dart, review_fixes_v1_3_3_test.dart, v1_3_3_comprehensive_testing_test.dart

Full changelog: CHANGELOG.md

…e callback, publish tooling

## Highlights
- CSS object-fit (cover/contain/fill/none/scale-down) for <img> elements
- CSS attribute selectors ([attr], [attr="val"], ^=, , *=, ~=, |=)
- rgb()/rgba() color parsing fix (csslib FunctionTerm reconstruction)
- onMemoryPressure callback on HyperViewer
- FloatCarryover imagePixelOffset for cross-section float rendering
- Ref-counted global TextPainter cache (multi-viewer safe)
- imageConcurrency config wired to LazyImageQueue
- Simplified publish.sh: remove dependency_overrides instead of full swap
- Reader app demo polish (bookmarks, themes, ToC)
- 973 tests passing, version bumps across all 7 sub-packages
- Documentation: ROADMAP, COMPARISON_MATRIX, MIGRATION_GUIDE updates
@vietnguyentuan2019 vietnguyentuan2019 merged commit 0000d3d into main Jun 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

✅ Layout Regression — All fixtures within 60 FPS budget

Fixture Budget (ms) Median (ms) P95 (ms)
simple_paragraph 8 14 20
mixed_inline 10 12 13
float_layout 12 13 17
table_20_rows 14 35 54
cjk_ruby 14 9 10
large_article 16 35 59

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 Jun 4, 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.

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