Skip to content

Commit 624b5ec

Browse files
committed
Merge branch 'master' into enxdev/fix/custom-tabs
2 parents c288f3f + 5ac5480 commit 624b5ec

File tree

503 files changed

+45104
-5744
lines changed

Some content is hidden

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

503 files changed

+45104
-5744
lines changed

.github/workflows/superset-docs-verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions/checkout@v6
2828
# Do not bump this linkinator-action version without opening
2929
# an ASF Infra ticket to allow the new version first!
30-
- uses: JustinBeckwith/linkinator-action@af984b9f30f63e796ae2ea5be5e07cb587f1bbd9 # v2.3
30+
- uses: JustinBeckwith/linkinator-action@f62ba0c110a76effb2ee6022cc6ce4ab161085e3 # v2.4
3131
continue-on-error: true # This will make the job advisory (non-blocking, no red X)
3232
with:
3333
paths: "**/*.md, **/*.mdx"

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ repos:
2727
args: [--check-untyped-defs]
2828
exclude: ^superset-extensions-cli/
2929
additional_dependencies: [
30+
types-cachetools,
3031
types-simplejson,
3132
types-python-dateutil,
3233
types-requests,

.rat-excludes

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,15 @@ temporary_superset_ui/*
6767
# skip license checks for auto-generated test snapshots
6868
.*snap
6969

70-
# docs overrides for third party logos we don't have the rights to
71-
google-big-query.svg
72-
google-sheets.svg
73-
ibm-db2.svg
74-
netlify.png
75-
postgresql.svg
76-
snowflake.svg
77-
ydb.svg
78-
loading.svg
79-
apache-solr.svg
80-
azure.svg
81-
superset.svg
82-
83-
# docs third-party logos, i.e. docs/static/img/logos/*
70+
# docs third-party logos (database logos, org logos, etc.)
71+
databases/*
8472
logos/*
8573

8674
# docs-related
8775
erd.puml
8876
erd.svg
8977
intro_header.txt
78+
TODO.md
9079

9180
# for LLMs
9281
llm-context.md

AGENTS.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,30 @@ superset/
101101
- **UPDATING.md**: Add breaking changes here
102102
- **Docstrings**: Required for new functions/classes
103103

104+
## Developer Portal: Storybook-to-MDX Documentation
105+
106+
The Developer Portal auto-generates MDX documentation from Storybook stories. **Stories are the single source of truth.**
107+
108+
### Core Philosophy
109+
- **Fix issues in the STORY, not the generator** - When something doesn't render correctly, update the story file first
110+
- **Generator should be lightweight** - It extracts and passes through data; avoid special cases
111+
- **Stories define everything** - Props, controls, galleries, examples all come from story metadata
112+
113+
### Story Requirements for Docs Generation
114+
- Use `export default { title: '...' }` (inline), not `const meta = ...; export default meta;`
115+
- Name interactive stories `Interactive${ComponentName}` (e.g., `InteractiveButton`)
116+
- Define `args` for default prop values
117+
- Define `argTypes` at the story level (not meta level) with control types and descriptions
118+
- Use `parameters.docs.gallery` for size×style variant grids
119+
- Use `parameters.docs.sampleChildren` for components that need children
120+
- Use `parameters.docs.liveExample` for custom live code blocks
121+
- Use `parameters.docs.staticProps` for complex object props that can't be parsed inline
122+
123+
### Generator Location
124+
- Script: `docs/scripts/generate-superset-components.mjs`
125+
- Wrapper: `docs/src/components/StorybookWrapper.jsx`
126+
- Output: `docs/developer_portal/components/`
127+
104128
## Architecture Patterns
105129

106130
### Security & Features

README.md

Lines changed: 62 additions & 66 deletions
Large diffs are not rendered by default.

RESOURCES/INTHEWILD.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,10 @@ categories:
287287
url: https://www.gfk.com/home
288288
contributors: ["@mherr"]
289289

290+
# Logo approved by @anmol-hpe on behalf of HPE
290291
- name: HPE
291292
url: https://www.hpe.com/in/en/home.html
293+
logo: hpe.png
292294
contributors: ["@anmol-hpe"]
293295

294296
- name: Hydrolix

UPDATING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,21 @@ assists people when migrating to a new version.
2424

2525
## Next
2626

27+
### WebSocket config for GAQ with Docker
28+
29+
[35896](https://github.com/apache/superset/pull/35896) and [37624](https://github.com/apache/superset/pull/37624) updated documentation on how to run and configure Superset with Docker. Specifically for the WebSocket configuration, a new `docker/superset-websocket/config.example.json` was added to the repo, so that users could copy it to create a `docker/superset-websocket/config.json` file. The existing `docker/superset-websocket/config.json` was removed and git-ignored, so if you're using GAQ / WebSocket make sure to:
30+
- Stash/backup your existing `config.json` file, to re-apply it after (will get git-ignored going forward)
31+
- Update the `volumes` configuration for the `superset-websocket` service in your `docker-compose.override.yml` file, to include the `docker/superset-websocket/config.json` file. For example:
32+
``` yaml
33+
services:
34+
superset-websocket:
35+
volumes:
36+
- ./superset-websocket:/home/superset-websocket
37+
- /home/superset-websocket/node_modules
38+
- /home/superset-websocket/dist
39+
- ./docker/superset-websocket/config.json:/home/superset-websocket/config.json:ro
40+
```
41+
2742
### Example Data Loading Improvements
2843
2944
#### New Directory Structure

docker/pythonpath_dev/superset_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class CeleryConfig:
105105

106106
CELERY_CONFIG = CeleryConfig
107107

108-
FEATURE_FLAGS = {"ALERT_REPORTS": True}
108+
FEATURE_FLAGS = {"ALERT_REPORTS": True, "DATASET_FOLDERS": True}
109109
ALERT_REPORTS_NOTIFICATION_DRY_RUN = True
110110
WEBDRIVER_BASEURL = f"http://superset_app{os.environ.get('SUPERSET_APP_ROOT', '/')}/" # When using docker compose baseurl should be http://superset_nginx{ENV{BASEPATH}}/ # noqa: E501
111111
# The base URL for the email report hyperlinks.

docker/superset-websocket/config.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/.claude/instructions.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Developer Portal Documentation Instructions
2+
3+
## Core Principle: Stories Are the Single Source of Truth
4+
5+
When working on the Storybook-to-MDX documentation system:
6+
7+
**ALWAYS fix the story first. NEVER add workarounds to the generator.**
8+
9+
## Why This Matters
10+
11+
The generator (`scripts/generate-superset-components.mjs`) should be lightweight - it extracts data from stories and passes it through. When you add special cases to the generator:
12+
- It becomes harder to maintain
13+
- Stories diverge from their docs representation
14+
- Future stories need to know about generator quirks
15+
16+
When you fix stories to match the expected patterns:
17+
- Stories work identically in Storybook and Docs
18+
- The generator stays simple and predictable
19+
- Patterns are consistent and learnable
20+
21+
## Story Patterns for Docs Generation
22+
23+
### Required Structure
24+
```tsx
25+
// Use inline export default (NOT const meta = ...; export default meta)
26+
export default {
27+
title: 'Components/MyComponent',
28+
component: MyComponent,
29+
};
30+
31+
// Name interactive stories with Interactive prefix
32+
export const InteractiveMyComponent: Story = {
33+
args: {
34+
// Default prop values
35+
},
36+
argTypes: {
37+
// Control definitions - MUST be at story level, not meta level
38+
propName: {
39+
control: { type: 'select' },
40+
options: ['a', 'b', 'c'],
41+
description: 'What this prop does',
42+
},
43+
},
44+
};
45+
```
46+
47+
### For Components with Variants (size × style grids)
48+
```tsx
49+
const sizes = ['small', 'medium', 'large'];
50+
const variants = ['primary', 'secondary', 'danger'];
51+
52+
InteractiveButton.parameters = {
53+
docs: {
54+
gallery: {
55+
component: 'Button',
56+
sizes,
57+
styles: variants,
58+
sizeProp: 'size',
59+
styleProp: 'variant',
60+
},
61+
},
62+
};
63+
```
64+
65+
### For Components Requiring Children
66+
```tsx
67+
InteractiveIconTooltip.parameters = {
68+
docs: {
69+
// Component descriptors with dot notation for nested components
70+
sampleChildren: [{ component: 'Icons.InfoCircleOutlined', props: { iconSize: 'l' } }],
71+
},
72+
};
73+
```
74+
75+
### For Custom Live Code Examples
76+
```tsx
77+
InteractiveMyComponent.parameters = {
78+
docs: {
79+
liveExample: `function Demo() {
80+
return <MyComponent prop="value">Content</MyComponent>;
81+
}`,
82+
},
83+
};
84+
```
85+
86+
### For Complex Props (objects, arrays)
87+
```tsx
88+
InteractiveMenu.parameters = {
89+
docs: {
90+
staticProps: {
91+
items: [
92+
{ key: '1', label: 'Item 1' },
93+
{ key: '2', label: 'Item 2' },
94+
],
95+
},
96+
},
97+
};
98+
```
99+
100+
## Common Issues and How to Fix Them (in the Story)
101+
102+
| Issue | Wrong Approach | Right Approach |
103+
|-------|---------------|----------------|
104+
| Component not generated | Add pattern to generator | Change story to use inline `export default` |
105+
| Control shows as text instead of select | Add special case in generator | Add `argTypes` with `control: { type: 'select' }` |
106+
| Missing children/content | Modify StorybookWrapper | Add `parameters.docs.sampleChildren` |
107+
| Gallery not showing | Add to generator output | Add `parameters.docs.gallery` config |
108+
| Wrong live example | Hardcode in generator | Add `parameters.docs.liveExample` |
109+
110+
## Files
111+
112+
- **Generator**: `docs/scripts/generate-superset-components.mjs`
113+
- **Wrapper**: `docs/src/components/StorybookWrapper.jsx`
114+
- **Output**: `docs/developer_portal/components/`
115+
- **Stories**: `superset-frontend/packages/superset-ui-core/src/components/*/`

0 commit comments

Comments
 (0)