Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image block: refactor and remove data-wp-body #58835

Merged
merged 27 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0ec6307
First changes
luisherranz Feb 6, 2024
ad47b6a
WIP
luisherranz Feb 7, 2024
cf918af
Make it work
luisherranz Feb 7, 2024
4df1efd
Remove focustrap and use state for overlay styles
luisherranz Feb 7, 2024
3575655
Move resize to directive
luisherranz Feb 7, 2024
ae7d44a
Move the scroll to a data-wp-on-window
luisherranz Feb 7, 2024
f29a0bf
Remove lightbox object fit
luisherranz Feb 7, 2024
d2f5728
Add classes for e2e tests
luisherranz Feb 8, 2024
77736ff
Small tweaks
luisherranz Feb 8, 2024
30bbbf5
Don't use wp-lightbox-container in overlay figures
luisherranz Feb 8, 2024
552924d
Refactor the directive arguments
luisherranz Feb 8, 2024
256a89c
More refactoring
luisherranz Feb 8, 2024
8959b58
Remove the `data-wp-body` directive
luisherranz Feb 8, 2024
864f3c6
Update changelog
luisherranz Feb 8, 2024
4408d63
Merge branch 'trunk' into remove-data-wp-body-from-image-block
luisherranz Feb 8, 2024
91c5635
Don't use wp_scripts_get_suffix() in Gutenberg
luisherranz Feb 8, 2024
5def4dd
Trigger setButtonStyles in resize
luisherranz Feb 8, 2024
21731e6
Merge branch 'trunk' into remove-data-wp-body-from-image-block
luisherranz Feb 8, 2024
e64c80c
Revert "Don't use wp_scripts_get_suffix() in Gutenberg"
luisherranz Feb 8, 2024
224ede7
Merge branch 'trunk' into remove-data-wp-body-from-image-block
luisherranz Feb 8, 2024
379ff75
Remove args passed to bind, class and style
luisherranz Feb 9, 2024
ff7b044
Final refactor
luisherranz Feb 9, 2024
b8c8ba2
Update changelog
luisherranz Feb 9, 2024
c6e28f6
Revert unnecessary changes
luisherranz Feb 9, 2024
c9e6d6d
Replace contain with cover
luisherranz Feb 9, 2024
3b06391
Make sure it doesn't fail when imageRef is not defined
luisherranz Feb 9, 2024
1a093d6
Fix buttonRef position
luisherranz Feb 9, 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
270 changes: 111 additions & 159 deletions packages/block-library/src/image/index.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/block-library/src/image/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
animation: both turn-on-visibility 0.35s;
}
}
&.hideanimationenabled {
&.show-closing-animation {
&:not(.active) {
animation: both turn-off-visibility 0.35s;
img {
Expand All @@ -327,7 +327,7 @@
animation: turn-on-visibility 0.4s forwards;
}
}
&.hideanimationenabled {
&.show-closing-animation {
&:not(.active) {
animation: none;
.lightbox-image-container {
Expand Down
Loading
Loading