You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance empty_state component documentation and template to support rich text formatting. Update docs with detailed descriptions and examples, and modify Handlebars template to conditionally render Markdown content.
Copy file name to clipboardExpand all lines: examples/official-site/sqlpage/migrations/60_empty_state.sql
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
INSERT INTO component(name, icon, description, introduced_in_version) VALUES
2
-
('empty_state', 'info-circle', 'Empty states are placeholders for first-use, empty data, or error screens', '0.35.0');
2
+
('empty_state', 'info-circle', 'Displays a large placeholder message to communicate a single information to the user and invite them to take action.
3
+
4
+
Typically includes a title, an optional icon/image, descriptive text (rich text formatting and images supported via Markdown), and a call-to-action button.
5
+
6
+
Ideal for first-use screens, empty data sets, "no results" pages, or error messages.', '0.35.0');
('title','Description of the empty state.','TEXT',TRUE,FALSE),
@@ -14,7 +18,10 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
14
18
15
19
INSERT INTO example(component, description, properties) VALUES
16
20
('empty_state', '
17
-
The empty_state component provides users with informative and visually appealing placeholders when there is no content to display in a particular section of an application or website. Its role is to enhance user experience by guiding users on what to do next, offering suggestions, or providing context about the absence of data. This component includes a title, a description, an action button and often an illustration or icon. The empty_state component helps to reduce confusion and encourages users to take action.
21
+
This example shows how to create a 404-style "Not Found" empty state with
22
+
- a prominent header displaying "404",
23
+
- a helpful description suggesting to adjust search parameters, and
24
+
- a "Search again" button with a search icon that links back to the search page.
18
25
',
19
26
json('[{
20
27
"component": "empty_state",
@@ -32,7 +39,9 @@ It''s possible to use an icon or an image to illustrate the problem.
32
39
"component": "empty_state",
33
40
"title": "A critical problem has occurred",
34
41
"icon": "mood-wrrr",
35
-
"description": "Thank you for restarting your browser and crossing your fingers.",
42
+
"description_md": "SQLPage can do a lot of things, but this is not one of them.
43
+
44
+
Please restart your browser and **cross your fingers**.",
0 commit comments