SQLpage icon indicating copy to clipboard operation
SQLpage copied to clipboard

[feat] `big_number` component - Add support for `link` to open other links

Open accforgithubtest opened this issue 9 months ago • 1 comments

It would be great if the big_number component can support row level parameters for link and target, that would allow the big_number item to be clickable and open another link (in a new tab if a _blank is specified for target, else in same window).

It would be useful in cases where a "Total" is highlighted using a big_number component, and clicking on the big number will open another .sql page which provides more detailed information, etc.

I see that there is a dropdown_item, which seems fine for the usecase highlighted in example to provide options to change preset date range, however when I use it for the redirect link, it does not feel right.

A directly clickable big_number component would be more user friendly.

accforgithubtest avatar Mar 17 '25 21:03 accforgithubtest

Yes, that would be nice indeed ! Pull request welcome ! The source is here https://github.com/sqlpage/SQLPage/blob/main/sqlpage/templates/big_number.handlebars

target=_blank is not very intuitive for people who are not already familiar with html, maybe we can find a better name for the option.

lovasoa avatar Mar 18 '25 08:03 lovasoa