SQLpage icon indicating copy to clipboard operation
SQLpage copied to clipboard

`link` in the tracking component

Open vks2 opened this issue 7 months ago • 5 comments

is it possible to attach a callback or custom on click function on any sqlpage components? for example, I would like to open a seaprate page on click on each "row" of tracking component. (i mean if an element i green, or red, it would be separate pages, so markdown in title won't work) should i take some ids for that? pls give a comprehensive example Thanks much! Best

vks2 avatar Apr 27 '25 23:04 vks2

I think what you need is a new link row level property on the tracking component.

Would you be ready to add it yourself, and open a pull request?

lovasoa avatar Apr 28 '25 07:04 lovasoa

could you provide an example of existing componenets, that suits the best pls?

vks2 avatar Apr 28 '25 07:04 vks2

Yes !

The source for the tracking component is here: https://github.com/sqlpage/SQLPage/blob/main/sqlpage/templates/tracking.handlebars

Some other components that have link properties are:

  • https://github.com/sqlpage/SQLPage/blob/main/sqlpage/templates/columns.handlebars
  • https://github.com/sqlpage/SQLPage/blob/main/sqlpage/templates/list.handlebars
  • https://github.com/sqlpage/SQLPage/blob/main/sqlpage/templates/columns.handlebars
  • https://github.com/sqlpage/SQLPage/blob/main/sqlpage/templates/card.handlebars

lovasoa avatar Apr 28 '25 07:04 lovasoa

This AI-generated introduction to the codebase is quite good, it can help diving into the internals faster: https://deepwiki.com/sqlpage/SQLPage

lovasoa avatar Apr 28 '25 09:04 lovasoa

i'm sorry, got some troubles with width-col implementing )got 2 rows instead of 1 or too wide row in case of col=6 with width=4). so switching back to markdown syntax possibilities.

vks2 avatar May 05 '25 23:05 vks2