Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b0d073a
Midway commit. Scaling out is broken
jeryj Oct 30, 2024
122790d
Fix zoom in animation
jeryj Oct 30, 2024
1dedf7a
Fix scaling by preserving CSS properites
jeryj Oct 30, 2024
114e23b
Prevent reflow from removing and re adding scrollbar in animation
jeryj Oct 30, 2024
39eb8dd
Only rerun zoom out use effects if zoom out has changed.
jeryj Oct 31, 2024
d08a6f6
Allow all CSS vars to update when scale changes
jeryj Oct 31, 2024
046902a
Midway commit. Math is wrong for addressing top/bottom exceptions
jeryj Oct 31, 2024
ab88dfa
Remove usePrevious usage
ajlende Oct 31, 2024
be9ade9
Add prefers-reduced-motion to setTimeout delay
ajlende Nov 5, 2024
9f2d384
WIP Working zoom without frame size
ajlende Nov 5, 2024
c4f97ba
Account for changes to client height when determining edge threshold
jeryj Nov 6, 2024
8bc12b2
Zoom to center unless it will reveal top or bottom
jeryj Nov 6, 2024
fffc48d
Account for a top threshold when zooming in and out
jeryj Nov 6, 2024
42dd030
Clean up math and add comments
ajlende Nov 6, 2024
5fff8f9
Add event listener instead of timeout
ajlende Nov 6, 2024
c182b70
Fix reduced motion
ajlende Nov 6, 2024
a9211e7
Remove timeout ref
ajlende Nov 6, 2024
6c91090
Refactor callback as separate effect
ajlende Nov 6, 2024
615f2b3
Fix JSDoc comment
ajlende Nov 6, 2024
907dde4
Try to add back useEffect cleanups
ajlende Nov 6, 2024
fe8fd4e
Initialize prevClientHeight in the useEffect
ajlende Nov 7, 2024
624be01
use useReducedMotion
jeryj Nov 7, 2024
b9eb0d2
Add test for zoom in/out location
jeryj Nov 7, 2024
d51db38
Hack to fix reduced motion
ajlende Nov 8, 2024
1e7f1ee
Clean up the frameSizeValue and scaleValue calculations
ajlende Nov 8, 2024
740cd9a
Replace TODO comments with HACK comments
ajlende Nov 8, 2024
37111fa
Add cleanup for raf
ajlende Nov 8, 2024
ce8665d
Simplify CSS diff for 6.7 review
ajlende Nov 8, 2024
ab31e44
Add one more HACK comment
ajlende Nov 8, 2024
0b4d86d
Do not allow scrollTopNext to be smaller than 0
jeryj Nov 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Hack to fix reduced motion
  • Loading branch information
ajlende committed Nov 8, 2024
commit d51db3854817c53b447124b84e6688721f628a89
5 changes: 4 additions & 1 deletion packages/block-editor/src/components/iframe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,10 @@ function Iframe( {
}

if ( prefersReducedMotion ) {
onZoomOutTransitionEnd();
// Hack: Wait for the window values to recalculate.
iframeDocument.defaultView.requestAnimationFrame(
onZoomOutTransitionEnd
);
} else {
iframeDocument.documentElement.addEventListener(
'transitionend',
Expand Down
Loading