Skip to content

Mason-it v1.0.1 - Stability & Performance Boost

Latest

Choose a tag to compare

@Druhin13 Druhin13 released this 11 May 08:14
· 2 commits to master since this release

🚀 Mason-it v1.0.1 is here, bringing key stability improvements and smoother performance! 🚀

This patch release addresses issues encountered with dynamic content and refines the layout refresh mechanism for a much more fluid user experience.

Key Changes in v1.0.1:

  • 🐛 Bug Fix: Accurate Layout with Hidden Items:
    • The core masonItArrange function now correctly identifies and ignores hidden items (display: none) during layout calculations. This resolves issues where removing or hiding grid items could lead to incorrect positioning or the entire grid shifting unexpectedly.
  • Performance Enhancement: Smoother Updates with requestAnimationFrame:
    • All layout arrangement calls (initialization, refresh, mutation observation, resize events) are now scheduled using window.requestAnimationFrame.
    • This ensures that DOM reads and writes are batched and synchronized with the browser's repaint cycle, significantly reducing layout jank and "flash of intermediate layout" when items are added, removed, or the grid is refreshed. Updates are now much smoother!
  • 🔧 Internal Refinements:
    • Introduced a pending queue (MasonItArrangePending) to prevent redundant layout calculations for the same element within a single animation frame.
    • Minor improvements to element validity checks before performing layout operations.

Why Upgrade?

If you're dynamically changing the visibility of items in your masonry grid or have noticed occasional layout shifts during updates, this version is highly recommended. The move to requestAnimationFrame also provides a generally more robust and performant experience.

Assets:

  • dist.zip: Contains the distributable files from the dist/ directory for v1.0.1:
    • mason-it.min.js (minified UMD version)
    • mason-it.js (unminified UMD version)
    • mason-it.esm.js (ES module version)
  • src.zip: Contains the full source code from the src/ directory for v1.0.1.

(GitHub will also automatically provide "Source code (zip)" and "Source code (tar.gz)" links containing the entire repository contents for the v1.0.1 tag.)

Getting Started & Documentation:

Refer to the updated README.md for full installation, usage, and API details.