Skip to content

card: add top image attributes for lazy loading#1283

Merged
lovasoa merged 2 commits into
sqlpage:mainfrom
setop:patch-2
May 12, 2026
Merged

card: add top image attributes for lazy loading#1283
lovasoa merged 2 commits into
sqlpage:mainfrom
setop:patch-2

Conversation

@setop
Copy link
Copy Markdown
Contributor

@setop setop commented May 7, 2026

This will be useful for long image gallery.

Developped according to HTML specs of img tag

This will be useful for long image gallery.

Developped according to [HTML specs of img tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#lazy)
Copy link
Copy Markdown
Collaborator

@lovasoa lovasoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you !

Comment on lines +1 to +7
INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'card', * FROM (VALUES
-- item level
('top_image_lasy', 'Whether the top image must be lazily or eagerly loaded. Defaults to false, meaning eagerly', 'BOOLEAN', FALSE, TRUE),
('top_image_width', 'Specify the top image width, in pixel. Help preventing a layout shift', 'INTEGER', FALSE, TRUE),
('top_image_height', 'Specify the top image height, in pixel. Help preventing a layout shift', 'INTEGER', FALSE, TRUE)
) x;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we directly edit the existing migration ? The official site recreates the db from scratch on every deploy anyway

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

I see your commit in this way.

Do I have to do anything else?

Copy link
Copy Markdown
Collaborator

@lovasoa lovasoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're good to go !

@lovasoa lovasoa merged commit 966b955 into sqlpage:main May 12, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants