Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion app/assets/builds/alchemy/admin.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions app/assets/builds/alchemy/alchemy_admin.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/assets/builds/alchemy/alchemy_admin.min.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export default class PictureThumbnail extends HTMLElement {
if (alt) {
this.image.alt = alt
}
this.image.loading = "lazy"
}

start(src) {
Expand Down
4 changes: 2 additions & 2 deletions app/stylesheets/alchemy/admin/images.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
alchemy-picture-thumbnail {
&[loading] {
img {
> img {
opacity: 0;
}
}

img {
> img {
opacity: 1;
transition: opacity var(--transition-duration);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,6 @@ describe("alchemy-picture-thumbnail", () => {
expect(element.image.alt).not.toBe("Test image")
})

it("sets loading to lazy", () => {
const element = renderComponent(
"alchemy-picture-thumbnail",
"<alchemy-picture-thumbnail></alchemy-picture-thumbnail>"
)
element.createImage("https://example.com/test.jpg")

expect(element.image.loading).toBe("lazy")
})

it("uses default src from attribute", () => {
const element = renderComponent(
"alchemy-picture-thumbnail",
Expand Down
Loading