- b647071: fixes zooming inside a dialog with click outside behavior
- 44473b3: include 'use client' directive in esm output
- 868d0e1: fix unzooming getting stuck in Safari
- Safari: Zoomable images make the body extend beyond the content (#627)
- flickering after unzooming (#631)
- img SVGs with no dimensions not scaling (#629)
- Zooming effect breaks when images is clicked while scrolling (#439)
- SVG arrows with text disappeared on Zoom (#438, continued again)
- Note: This is a vexing issue due to all the possible things that can go wrong with cloning an SVG element that has HTML IDs inside of it. Hopefully, this is the last fix for this issue.
- SVG arrows with text disappeared on Zoom (#438, continued)
- Accidental non-dev dependency on
@storybook/test
when this lib should have zero non-dev dependencies (PR: #563)
- Zoomable image breaks on Chrome (#470)
- Improve iOS pinch-to-zoom experience (#436)
- When I deploy to Vercel / Next 13 and I change routes to a page I get "DOMException: Failed to execute 'showModal' on 'HTMLDialogElement': The element is not in a Document." (#429)
- SVG arrows with text disappeared on Zoom (#438)
- Fixes for the zoom behaviour and overlay height in iOS Safari (#434)
- Esc to exit zoom doesn't work on Safari (#430)
- Pressing back button in browser after zooming an image breaks body scroll (#421)
- Possibly broke zooming divs where role="img" (#412)
- Older browser versions querySelector error (#391)
- Cannot read properties of undefined (reading 'left') with Zoom Component and React SVG Component in Docusaurus (#406)
- Warning: NaN is an invalid value for the width css style property. (#375)
- Image has already been loaded (#389)
- Image is hidden when pressing escape during hiding animation (issue #378)
zoomMargin
portion of "Neither zoomMargin nor scrollableEl seem to be working correctly" (issue #350)- Clicking on zoomed SVGs doesn't unzoom (issue #369)
- Ability to customize the zoom modal content via
<ZoomContent>
(issue #332) - Re-added
wrapElement
prop to API; only supports'div' | 'span'
(issue #356) - Added a11y support for
prefers-reduced-motion: reduce
(issue #359) - Added
classDialog
string prop to account for the loss of granular styling control over different modals resulting from moving the<dialog>
rendering to a portal
- Now rendering
<dialog>
in a portal because of #356- For the folx using
.my-class [data-rmiz-modal] {}
to change the<dialog>
styles, please use theclassDialog
prop to passmy-class
to the<dialog>
. I wish I didn't have to do this, but this is something that needs fixing, and I can't justify a new major version just because of this new style requirement. TheclassDialog
addition (mentioned above) should solve this nicely.
- For the folx using
- Now using the
wheel
event instead ofscroll
to detect trying to leave the modal (issue #350) - Fixed mobile scrolling experience (related to issue #350)
- Removed the broken
scrollableEl
that has arguably not ever worked (issue #350)
- Missing class properties transform (#337) (potential issue versions of node older than LTS)
- Not working with gatsby image plugin (StaticImage) (#347)
- React hydration issue (#338)
Closes #164, #166, #213, #227, #259, #265, #281, #282
- Added
IconUnzoom
andIconZoom
in order to customize the zoom & unzoom buttons - Added
zoomImg
to provide attributes for an image that should be loaded on zoom - Added better zooming support for all of the following:
<img />
, including allobject-fit
values, anyobject-position
, andloading="lazy"
<div>
and<span>
with anybackground-image
,background-size
, andbackground-position
<picture>
with<source />
and<img />
<figure>
with<img />
- Sets
"type": "module"
inpackage.json
for ESModule usage - Renamed
closeText
toa11yNameButtonUnzoom
- Renamed
openText
toa11yNameButtonZoom
- Images must meet these
querySelector
criteria to be found:':is(img, svg, [role="img"], [data-zoom]):not([aria-hidden="true"])';
- Removed
focus-options-polyfill
dependency - Removed
tslib
dependency - Removed
overlayBgColorStart
(now specified via CSS:[data-rmiz-modal-overlay="hidden"]
) - Removed
overlayBgColorEnd
(now specified via CSS:[data-rmiz-modal-overlay="visible"]
) - Removed
portalEl
- Removed
transitionDuration
(now specified via CSS:[data-rmiz-modal-overlay]
and[data-rmiz-modal-img]
) - Removed
wrapElement
- Removed
wrapStyle
- Removed
zoomZIndex
- Reverts setting
"type": "module"
inpackage.json
(issue: #322)
- Fixes some docs badges
- Switched project name back to
react-medium-image-zoom
and fixed links - I'm not even sure it was working, but turned off
sourceMaps: true
in the tsconfig - Moved
AUTHORS
file intocontributors
key inpackage.json
- Added
funding
info topackage.json
- Bumped minor version of
tslib
and made sure to actually use it (#306) - Adds an
aria-label
to the modal to satisfyaxe-core
; note that this is still not an accessible component. It will be eventually! (#306)
- Removed dependency on
react-use
(#306)
- Fix Incompatible types with types/react v18 (#302)
- Allow React 18 (#300)
- Fix not exporting component props (#287)
- Fix
latest
tag not being v4.x :smh:
- fixed old links to
/react-medium-image-zoom/
to/image-zoom/
react
andreact-dom
peerDependencies
moved from>= 16.8.0
to^16.8.0 || ^17.0.0
- upgraded
react-use
- set all dependencies to use compatibility
^
selectors
tslib
was listed as dev dependency when it's actually a dependency
- support for passing a
wrapElement
(defaults todiv
)
- adding
wrapElement
support resolvesdiv
vsspan
issue #236 (thanks to @sunknudsen)
- now providing both unminified and minified UMD builds
- massively reduced build size (#226)
- server-side-rendering (#229)
- webkit 100% width image issue (#222)
- CSS styles are now applied using
data-rmiz-<something>
selectors, allowing the styles to be imported and overridden - babel
- remove
@babel/cli
because it's not being used - don't use
@babel/polyfill
for anything; replaced with@babel/plugin-transform-runtime
- remove
- removed
browser
field from package.json b/c bundler confusion - not including sourcemaps anymore unless that's a specific desire from users
- lock down dependencies to specific versions
- upgrade some dev dependencies
- upgrade
react-use
- Replace temporary focus-options-polyfill with package now that it's fixed
- Added CJS & UMD minified builds
- resolved prod issue where CSS wasn't included in
sideEffects
Complete rewrite with breaking changes so we can move forward with the project.
Please see the README.md for the new API and migrating from v3 to v4.
- resolved a few security issues
- Support Preact by using
React.Fragment
(PR #152)
- Support for
React.StrictMode
(PR #151)
- Fixes JS error when
_allowTabNavigation
is called before image ref (PR #150)
- Resolved issue #139 where
zoomMargin
wouldn't accept a number in string format
- Resolved issue #137 where broken images would continue allowing the component to function
- Now ensures an
image
prop'sonLoad
callback is adequately sent to the consumer
- Resolved issue where we were calculating
imageCenterX
withwindow.innerWidth
instead ofdocument.body.clientWidth
(PR: #133)
- Changed shield in README
- Resolved issue #128 where initializing with isZoomed={true} was throwing errors.
- removed the Firefox check and apply the flicker "fix" to all browsers equally
- Resolved Firefox issue where switching an image's
src
attribute causes an obnoxious "flicker" effect (#96)
AUTHORS
file
AUTHORS
file (#107)
- Fixed issue where quickly, repeatedly triggering the zoom and unzoom actions had some lingering timeout actions that no longer existing on a component, throwing errors in the console (#106)
- Fixed issue where hitting the tab key on a zoomed imaged would allow an element in behind the image to receive focus. Further actions could then be taken on the focused element, causing the DOM to end up in undesired states.
- Fixed issue where hitting the tab key on a zoomed imaged would allow an element in behind the image to receive focus. Further actions could then be taken on the focused element, causing the DOM to end up in undesired states.
- Fixed readme rebase issue
- Fixed issue from #89 where
hasAlreadyLoaded
was preventing thezoomImage
source from displaying whenshouldReplaceImage
was set tofalse
.
- Includes the keyboard navigation and clicking updates from 2.0.5 and 2.0.6 for React >16
- Fixed issue where clicking to open & close a zoomable image resulted in the focusing of that element which could cause the page to scroll it completely into view and leave an outline on the image (aka focus) when it was not accessed via the keyboard.
- Fixed issue where updating other image attributes after mounting was not respected; the image was cached in
this.state
when only thesrc
should have been.
- Now supporting keyboard interaction for accessibility (#70). Classified this as a bug and therefore a patch version.
- Now supporting keyboard interaction for accessibility (#70). Classified this as a bug and therefore a patch version.
- support for React v16, making use of such things as its portals concept
- support for React less than v16
shouldRespectMaxDimension
was allowing images that were already rendered at their maximum size to be "zoomed," thus creating the issue where they don't actually zoom and instead just moved to the center of the screen.
- Fixed undefined method call (underscore was missing...c'mon eslint)
- Fixed original image not staying hidden until unzoom is complete
- Dev: eslint & prettier for code formatting and double-dhecking
- Changelog (so meta...)
- When in controlled mode (
isZoomed
is provided), theonUnzoom
callback will fire when the component normally would have closed
- Differentiation between controlled & uncontrolled modes (when
isZoomed
is passed vs letting component control itself)
- Removed preload functionality
- Support for the component immediately zooming if
isZoomed={true}
is provided on mount