Skip to content

Commit d25c075

Browse files
authored
Merge branch 'master' into fix-no-top-level-tab
2 parents 93066ad + 673634f commit d25c075

223 files changed

Lines changed: 16180 additions & 16351 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
**/*.geojson @villebro @rusackas
3737
/superset-frontend/plugins/legacy-plugin-chart-country-map/ @villebro @rusackas
3838

39+
# Notify translation maintainers of changes to translations
40+
41+
/superset/translations/ @sfirke
42+
3943
# Notify PMC members of changes to extension-related files
4044

4145
/docs/developer_portal/extensions/ @michael-s-molina @villebro @rusackas

.github/workflows/ephemeral-env.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ jobs:
265265
266266
- name: Fill in the new image ID in the Amazon ECS task definition
267267
id: task-def
268-
uses: aws-actions/amazon-ecs-render-task-definition@77954e213ba1f9f9cb016b86a1d4f6fcdea0d57e # v1
268+
uses: aws-actions/amazon-ecs-render-task-definition@6853cfae8c3a7d978fbf68b5a55453395541dfbb # v1
269269
with:
270270
task-definition: .github/workflows/ecs-task-definition.json
271271
container-name: superset-ci
@@ -300,7 +300,7 @@ jobs:
300300
--tags key=pr,value=$PR_NUMBER key=github_user,value=${{ github.actor }}
301301
- name: Deploy Amazon ECS task definition
302302
id: deploy-task
303-
uses: aws-actions/amazon-ecs-deploy-task-definition@fc8fc60f3a60ffd500fcb13b209c59d221ac8c8c # v2
303+
uses: aws-actions/amazon-ecs-deploy-task-definition@a310a830f5c14e583e35d84e4e1ec7dd177c3c9c # v2
304304
with:
305305
task-definition: ${{ steps.task-def.outputs.task-definition }}
306306
service: pr-${{ github.event.inputs.issue_number || github.event.pull_request.number }}-service
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
title: Handlebars Chart
3+
hide_title: true
4+
sidebar_position: 10
5+
version: 1
6+
---
7+
8+
## Handlebars Chart
9+
10+
The Handlebars chart lets you render query results using a custom [Handlebars](https://handlebarsjs.com/) template. This gives you full control over how your data is displayed — from simple tables to rich HTML layouts.
11+
12+
### Basic Usage
13+
14+
In the chart editor, write a Handlebars template in the **Template** field. Your query results are available as `data`, an array of row objects.
15+
16+
```handlebars
17+
{{#each data}}
18+
<p>{{this.name}}: {{this.value}}</p>
19+
{{/each}}
20+
```
21+
22+
### Built-in Helpers
23+
24+
Superset registers several custom helpers on top of the standard Handlebars built-ins.
25+
26+
#### `dateFormat`
27+
28+
Formats a date value using [Day.js](https://day.js.org/) format strings.
29+
30+
```handlebars
31+
{{dateFormat my_date format="MMMM YYYY"}}
32+
```
33+
34+
| Option | Default | Description |
35+
|--------|---------|-------------|
36+
| `format` | `YYYY-MM-DD` | A Day.js-compatible format string |
37+
38+
---
39+
40+
#### `stringify`
41+
42+
Converts an object to a JSON string, or any other value to its string representation.
43+
44+
```handlebars
45+
{{stringify myObj}}
46+
```
47+
48+
---
49+
50+
#### `formatNumber`
51+
52+
Formats a number using locale-aware formatting.
53+
54+
```handlebars
55+
{{formatNumber myNumber "en-US"}}
56+
```
57+
58+
| Option | Default | Description |
59+
|--------|---------|-------------|
60+
| `locale` | `en-US` | A BCP 47 language tag |
61+
62+
---
63+
64+
#### `parseJson`
65+
66+
Parses a JSON string into an object that can be used in your template.
67+
68+
```handlebars
69+
{{parseJson myJsonString}}
70+
```
71+
72+
---
73+
74+
#### `groupBy`
75+
76+
Groups an array of objects by a key, powered by [handlebars-group-by](https://github.com/nicktindall/handlebars-group-by).
77+
78+
```handlebars
79+
{{#groupBy data "department"}}
80+
<h3>{{value}}</h3>
81+
{{#each items}}
82+
<p>{{this.name}}</p>
83+
{{/each}}
84+
{{/groupBy}}
85+
```
86+
87+
---
88+
89+
### Helpers from just-handlebars-helpers
90+
91+
Superset also registers all helpers from the [just-handlebars-helpers](https://github.com/leapfrogtechnology/just-handlebars-helpers) library. These include a wide range of comparison, math, string, and conditional helpers. Commonly used ones include:
92+
93+
#### Comparison
94+
95+
| Helper | Description | Example |
96+
|--------|-------------|---------|
97+
| `eq` | Strict equality | `{{#if (eq status "active")}}` |
98+
| `eqw` | Weak equality | `{{#if (eqw count "5")}}` |
99+
| `neq` | Strict inequality | `{{#if (neq role "admin")}}` |
100+
| `lt` | Less than | `{{#if (lt score 50)}}` |
101+
| `lte` | Less than or equal | `{{#if (lte score 100)}}` |
102+
| `gt` | Greater than | `{{#if (gt price 0)}}` |
103+
| `gte` | Greater than or equal | `{{#if (gte age 18)}}` |
104+
105+
#### Logical
106+
107+
| Helper | Description | Example |
108+
|--------|-------------|---------|
109+
| `and` | Logical AND | `{{#if (and isActive isVerified)}}` |
110+
| `or` | Logical OR | `{{#if (or isAdmin isMod)}}` |
111+
| `not` | Logical NOT | `{{#if (not isDisabled)}}` |
112+
| `ifx` | Inline conditional | `{{ifx isActive "Yes" "No"}}` |
113+
| `coalesce` | Returns first non-falsy value | `{{coalesce nickname name "Anonymous"}}` |
114+
115+
#### String
116+
117+
| Helper | Description | Example |
118+
|--------|-------------|---------|
119+
| `capitalize` | Capitalizes first letter | `{{capitalize name}}` |
120+
| `uppercase` | Converts to uppercase | `{{uppercase status}}` |
121+
| `lowercase` | Converts to lowercase | `{{lowercase email}}` |
122+
| `truncate` | Truncates a string | `{{truncate description 100}}` |
123+
| `contains` | Checks if string contains substring | `{{#if (contains tag "urgent")}}` |
124+
125+
#### Math
126+
127+
| Helper | Description | Example |
128+
|--------|-------------|---------|
129+
| `add` | Addition | `{{add a b}}` |
130+
| `subtract` | Subtraction | `{{subtract total discount}}` |
131+
| `multiply` | Multiplication | `{{multiply price quantity}}` |
132+
| `divide` | Division | `{{divide total count}}` |
133+
| `ceil` | Ceiling | `{{ceil value}}` |
134+
| `floor` | Floor | `{{floor value}}` |
135+
| `round` | Round | `{{round value}}` |
136+
137+
For the full list of available helpers, see the [just-handlebars-helpers documentation](https://github.com/leapfrogtechnology/just-handlebars-helpers).
138+
139+
### Tips
140+
141+
- Use raw blocks to escape Handlebars syntax if you need to display double curly braces literally.
142+
- Comparison helpers like `eq` must be wrapped in a subexpression when used with `#if`: `{{#if (eq myVal "foo")}}`.
143+
- HTML output is sanitized by default based on your Superset configuration (`HTML_SANITIZATION`).

docs/package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@
4141
},
4242
"dependencies": {
4343
"@ant-design/icons": "^6.2.2",
44-
"@docusaurus/core": "^3.10.0",
45-
"@docusaurus/faster": "^3.10.0",
46-
"@docusaurus/plugin-client-redirects": "^3.10.0",
47-
"@docusaurus/preset-classic": "3.10.0",
48-
"@docusaurus/theme-live-codeblock": "^3.10.0",
49-
"@docusaurus/theme-mermaid": "^3.10.0",
44+
"@docusaurus/core": "^3.10.1",
45+
"@docusaurus/faster": "^3.10.1",
46+
"@docusaurus/plugin-client-redirects": "^3.10.1",
47+
"@docusaurus/preset-classic": "3.10.1",
48+
"@docusaurus/theme-live-codeblock": "^3.10.1",
49+
"@docusaurus/theme-mermaid": "^3.10.1",
5050
"@emotion/core": "^11.0.0",
5151
"@emotion/react": "^11.13.3",
5252
"@emotion/styled": "^11.14.1",
@@ -92,8 +92,8 @@
9292
"unist-util-visit": "^5.1.0"
9393
},
9494
"devDependencies": {
95-
"@docusaurus/module-type-aliases": "^3.10.0",
96-
"@docusaurus/tsconfig": "^3.10.0",
95+
"@docusaurus/module-type-aliases": "^3.10.1",
96+
"@docusaurus/tsconfig": "^3.10.1",
9797
"@eslint/js": "^9.39.2",
9898
"@types/js-yaml": "^4.0.9",
9999
"@types/react": "^19.1.8",
@@ -124,8 +124,7 @@
124124
"resolutions": {
125125
"react-redux": "^9.2.0",
126126
"@reduxjs/toolkit": "^2.5.0",
127-
"baseline-browser-mapping": "^2.9.19",
128-
"webpackbar": "^7.0.0"
127+
"baseline-browser-mapping": "^2.9.19"
129128
},
130129
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
131130
}

0 commit comments

Comments
 (0)