sqlpage / SQLPage

Fast SQL-only data application builder. Automatically build a UI on top of SQL queries.
https://sql.datapage.app
MIT License
1.57k stars 89 forks source link

Card - Width component not functioning properly. #530

Closed Pieter3033 closed 1 month ago

Pieter3033 commented 1 month ago

Card - Width property not functioning properly.

The width property of the card component does not function properly. It does default to width = 3, and it works with width values of 6 and above.

As soon as you change the width to any value below 6 it defaults to width = 6.

To Reproduce

  1. Create card component.
  2. Adjust the width to any valuu below 6.
/**Card Components**/
SELECT 'card' AS component

/**New JobCard**/
SELECT 'Card 1' AS title
       ,'page1.sql' AS link
       ,'facebook' AS color
       ,'map-pin' AS icon
       ,'Create a new Jobcard' as description
       ,'azure-lt' as background_color
       ,2 as width

/**View All JobCards**/
SELECT 'Card 2' AS title
       ,'page2.sql' AS link
       ,'yellow' AS color
       ,'world-pin' AS icon
       ,'Create a new Jobcard' as description
       ,1 as width

SELECT 'Card 3' AS title
       ,'green' AS color
       ,'camera' AS icon
       ,'Coming Soon!' AS description
       ,'' AS footer
       ,'page3.sql' AS link

Actual behavior

No errors on command prompt.

Screenshots

image

Expected behavior

The cards should adjust their width accordingly.

Version information

lovasoa commented 1 month ago

Thanks for the report. I'll fix it for the next version.

In the meantime, you can update your card.handlebars locally, replacing md with lg on that line: https://github.com/lovasoa/SQLpage/blob/main/sqlpage/templates/card.handlebars#L20

image