-
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
Add link & target props to big_number.handlebars #861
base: main
Are you sure you want to change the base?
Conversation
Thanks Hansky ! As I said in #859 , I think target=_blank is not the most user friendly for people who are not already familiar with html. Maybe By the way, do you work with @accforgithubtest ? |
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.
Could you also document the changes and add an example for them in https://github.com/sqlpage/SQLPage/blob/main/examples/official-site/sqlpage/migrations/49_big_number.sql ?
{{#if title}} | ||
<div class="d-flex align-items-center"> | ||
<div class="subheader text-truncate me-2">{{title}}</div> | ||
<!-- Otsikko (title): mahdollisuus linkkiin ja targetiin --> |
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.
Could we translate the comments to english and use handlebars comments ?
No, I don't work @accforgithubtest and didn't read that discussion beforehand. I did do some modifications regarding that title_link_new_tab and modified 49_big_number.sql. |
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.
Can you update the changelog and the documentation too ?
<div class="subheader text-truncate me-2"> | ||
{{!-- Introduced `title_link_new_tab` and `value_link_new_tab`. If set to a truthy value, opens the link in a new tab (target="_blank"). Otherwise, defaults to same tab (target="_self"). --}} |
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.
now I understand the comment, but I think we can do without it :) We have a human-readable changelog in /CHANGELOG.md
{{!-- Introduced `title_link_new_tab` and `value_link_new_tab`. If set to a truthy value, opens the link in a new tab (target="_blank"). Otherwise, defaults to same tab (target="_self"). --}} |
<div class="h1 {{#if description}}mb-3{{else}}mb-0{{/if}} mt-auto text-nowrap text-truncate"> | ||
{{!-- Introduced `title_link_new_tab` and `value_link_new_tab`. If set to a truthy value, opens the link in a new tab (target="_blank"). Otherwise, defaults to same tab (target="_self"). --}} |
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.
{{!-- Introduced `title_link_new_tab` and `value_link_new_tab`. If set to a truthy value, opens the link in a new tab (target="_blank"). Otherwise, defaults to same tab (target="_self"). --}} |
{{/if}} | ||
</div> | ||
{{~/if~}} | ||
{{~#if progress_percent~}} | ||
{{/if}} | ||
|
||
{{#if progress_percent}} |
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.
why removing the whitespace-trimming tags?
Well, then you both had the same idea at almost the same time :) You'll make someone happy ! |
We needed link functionality for the Big Number component
This PR introduces support for adding links to both the title and the value fields in the Big Number component. It also allows specifying whether those links should open in the same tab (_self) or a new tab (_blank). The goal is to enable more interactive dashboards where users can navigate between pages directly by clicking on a Big Number’s text.
Usage
Added four optional properties: