-
Notifications
You must be signed in to change notification settings - Fork 126
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
feat: add lazy component #615
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
select 'lazy' as component; | ||
|
||
select | ||
'/chart-example.sql?_sqlpage_embed' as embed, | ||
'card my-2' as class, | ||
'height:340px' as style; | ||
|
||
select '/map-example.sql' as embed; | ||
|
||
select '/table-example.sql?_sqlpage_embed' as embed; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div class="{{default class "my-2"}}"{{~#if style}} style="{{style}}" {{/if~}}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In all other components, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i know and i hesitate, this div is a light wrapper and i think user should be able to reset it easily if needed. same for should we just give no default and handle it like the style param ? |
||
{{#each_row}} | ||
<div data-embed="{{embed}}"> | ||
<div class="{{default class "card my-2"}}" {{~#if style}} style="{{style}}" {{/if~}}> | ||
<div class="h-full w-full p-2 d-flex align-items-center justify-content-center"> | ||
<div class="spinner-border" role="status" style="width: 3rem; height: 3rem;"> | ||
<span class="visually-hidden">Loading...</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{/each_row}} | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we keep
as embed
oras lazy
here ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
as embed
is good