Skip to content

v3.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 26 Jul 14:13
· 19 commits to main since this release

3.0.0 (2024-07-26)

Release 3.0 comes with several new exciting features and an internal redesign to reduce the JS bundle size:

  • Replacement of CSS-in-JS styling with an external CSS stylesheet
  • Splitting the all-in-one PhotoAlbum component into three layout-specific components (the bundle is now tree-shakeable)
  • Experimental SSR component (zero-CLS SSR)
  • Experimental InfiniteScroll component (rows and masonry layouts)
  • Experimental ServerPhotoAlbum server component (zero client-side JS bundle)

Here is the overall impact on the JS bundle size (minified gzip):

  • rows layout: 2.9 KB (38% decrease)
  • columns layout: 2.9 KB (39% decrease)
  • masonry layout: 2.3 KB (51% decrease)
  • 3-in-1: 3.8 KB (19% decrease)

BREAKING CHANGES

  • CSS stylesheet is required
  • PhotoAlbum component is replaced with 4 separate components
  • the library is now ESM-only
  • CJS build is no longer bundled
  • React 16 and React 17 are no longer supported
  • minimum Node version is set to Node 18
  • output target is set to ES2020
  • renderContainer is replaced with render.container render function
  • renderRowContainer is replaced with render.track render function
  • renderColumnContainer is replaced with render.track render function
  • renderPhoto is replaced with more granular render functions; see docs
  • componentsProps.containerProps is replaced with componentsProps.container
  • componentsProps.rowContainerProps is replaced with componentsProps.track
  • componentsProps.columnContainerProps is replaced with componentsProps.track
  • componentsProps.imageProps is replaced with more granular props; see docs
  • images photo prop is no longer supported

Features

  • add experimental InfiniteScroll component (fb2a048)
  • add experimental ServerPhotoAlbum component (b5cabe4)
  • add experimental SSR component (61b8a42)
  • add SSR fallback skeleton (475f2fb)
  • enhance SSR component styling options (4398aad)
  • forward photo album ref (00edf7c)
  • improve types usability (f200a6c)
  • offload offscreen photos in InfiniteScroll (eb3dd0d)

Bug Fixes

  • add client boundary to aggregate layout (34a24c9)
  • fix minPhotos edge case (7a04f02)
  • move SSR component to subpath export (a1b0c28)
  • set container box-sizing to border-box (b2aebf4)

Miscellaneous

  • feat!: v3 rewrite (b67e436)
  • chore!: bump output target to ES2020 (9df797b)
  • chore!: bump React peer dependency version to 18 (86ed361)
  • chore!: convert to ESM (f1bc7a4)
  • chore!: drop deprecated photo images prop (644e2f9)