docs: bifurcate documentation into user, admin, and developer sections#38196
docs: bifurcate documentation into user, admin, and developer sections#38196
Conversation
|
Bito Automatic Review Skipped - Large PR |
Add redirects for old /docs/ paths that were moved to /admin-docs/ or /developer-docs/: Configuration: - /docs/configuration/country-map-tools - /docs/configuration/importing-exporting-datasources - /docs/configuration/map-tiles - /docs/configuration/networking-settings - /docs/configuration/timezones Security: - /docs/security/cves - /docs/security/securing_superset Contributing: - /docs/contributing/resources - /docs/contributing/misc - /docs/contributing/pkg-resources-migration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix broken links in quickstart.mdx pointing to old /docs/installation and /docs/configuration paths, now redirecting to /admin-docs/ - Fix broken links in faq.mdx for installation, configuration, and contributing paths - Fix link in generate-database-docs.mjs for auto-generated database index page - Add new user-facing SQL templating guide in using-superset/ that covers practical usage of Jinja templates in SQL Lab - Add cross-link tip in admin SQL templating config guide pointing users to the new user guide Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Major restructuring of documentation to separate concerns: **New Structure:** - `/docs/` - User-facing docs (intro, quickstart, databases, using-superset, faq) - `/admin-docs/` - Administrator docs (installation, configuration, security) - `/developer-docs/` - Developer docs (contributing, extensions, guidelines, testing) **Changes:** - Move installation, configuration, and security docs to admin_docs/ - Move contributing, extensions, guidelines, and testing to developer_docs/ - Rename developer_portal to developer_docs (with underscore to hyphen in URL) - Add sidebarAdminDocs.js for admin documentation navigation - Update versions-config.json with new doc sections - Update docusaurus.config.ts with new plugins and redirects - Update internal links in versioned docs (6.0.0) to use new paths - Keep user-facing content (databases, using-superset, faq) in main docs This separation makes it clearer which documentation is relevant for: - End users exploring and visualizing data - Administrators deploying and configuring Superset - Developers contributing to or extending Superset Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rename the user documentation URL path from /docs to /user-docs to match the naming convention of /admin-docs and /developer-docs. Changes: - Add routeBasePath: 'user-docs' to preset-classic docs config - Add createRedirects for /docs/* → /user-docs/* pattern-based redirects - Update all redirect destinations from /docs/* to /user-docs/* - Update navbar links to use /user-docs/ - Update sitemap priorities to use /user-docs/ - Update internal links in user docs, admin docs, and developer docs - Update footer security link to /admin-docs/security/ All old /docs/* URLs will automatically redirect to /user-docs/* via the createRedirects function. Versioned docs at /docs/6.0.0/* remain unchanged. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tent - Replace all /developer_portal/ links with /developer-docs/ in index.md - Fix non-existent extension-project-structure references - Fix sidebar links using old /docs/ paths (/user-docs/ instead) - Add missing extension-points/editors and pkg-resources-migration to sidebar - Restore Kubernetes debugging section lost during howtos migration - Restore pkg-resources-migration.md deleted during bifurcation - Fix versioned docs quickstart.mdx missing version prefix - Update stale developer_portal references in README, DOCS_CLAUDE, intro.md - Fix broken creating-viz-plugins link in intro.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
78a9f9a to
26efc31
Compare
| ## Import | ||
|
|
||
| ```tsx | ||
| import Slider from '@superset/components'; |
There was a problem hiding this comment.
Suggestion: The import example uses a default import from the barrel module, but this module can only have a single default export, so importing one specific component as the default (Slider) is misleading and inconsistent with the pattern used for other components, likely causing consumers to import the wrong value; switch to a named import to correctly reference the Slider component. [possible bug]
Severity Level: Major ⚠️
- ⚠️ Slider import snippet misleads developers integrating Superset components.
- ⚠️ Copy-pasted snippet can cause runtime React element errors.
- ⚠️ Inconsistent with other UI docs using named imports.| import Slider from '@superset/components'; | |
| import { Slider } from '@superset/components'; |
Steps of Reproduction ✅
1. Open the Slider UI component docs at
`docs/developer_docs/components/ui/slider.mdx:227-246`, which show the import snippet:
```tsx
import Slider from '@superset/components';
-
Note from
docs/src/components/StorybookWrapper.jsx:36-47and
docs/src/theme/ReactLiveScope/index.tsx:48-58thatrequire('@superset/components')
returns an object (SupersetComponents) whose keys are individual components (e.g.
Button,Slider) and is merged into a registry by spreading the object, indicating
components are exposed as properties, not as a single default React component. -
A developer following the Slider docs copies the snippet
import Slider from '@superset/components';into their own Superset-frontend extension or external React
project, then uses<Slider />in JSX expecting a React component. -
At runtime, because
@superset/componentsis an object of components (per the
requireusage) and not a single defaultSliderexport,Sliderwill actually be that
object, causing React to throw "Element type is invalid: expected a string (for built-in
components) or a class/function but got: object" when rendering, until the import is
corrected toimport { Slider } from '@superset/components';.
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** docs/developer_docs/components/ui/slider.mdx
**Line:** 245:245
**Comment:**
*Possible Bug: The import example uses a default import from the barrel module, but this module can only have a single default export, so importing one specific component as the default (`Slider`) is misleading and inconsistent with the pattern used for other components, likely causing consumers to import the wrong value; switch to a named import to correctly reference the `Slider` component.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
There was a problem hiding this comment.
Good catch — fixed in 779d677. This was a bug in the auto-generated docs: @superset/components only exposes named exports, so the default import would resolve to the module object rather than the component. Fixed this for Slider and 4 other components (Tree, ProgressBar, TableCollection, Tabs) that had the same issue.
| ## Import | ||
|
|
||
| ```tsx | ||
| import Tree from '@superset/components'; |
There was a problem hiding this comment.
Suggestion: The import example for the Tree component uses a default import from the '@superset/components' module, but the components index only provides Tree as a named export, so copying this snippet into real code will fail or not import the component correctly. [logic error]
Severity Level: Major ⚠️
- ⚠️ Tree component docs show incorrect import syntax.
- ⚠️ Copy-pasting snippet into plugins causes import/build failures.| import Tree from '@superset/components'; | |
| import { Tree } from '@superset/components'; |
Steps of Reproduction ✅
1. Open `docs/developer_docs/components/ui/tree.mdx` and locate the "Import" section at
lines 257–261, which shows:
```tsx
import Tree from '@superset/components';
-
Create a new React/TypeScript component in a Superset frontend or extension package
that imports using this snippet:import Tree from '@superset/components';and then renders<Tree treeData={[]} />. -
Build or type-check the frontend using the same component library used by the docs,
which exposes components via@superset/components. The module is treated as an object of
named exports, as seen indocs/src/components/StorybookWrapper.jsx:36–47, where
require('@superset/components')is spread into a registry and its keys are used as
component names. -
Observe that the build or type-check fails (e.g., TypeScript "Module
'@superset/components' has no default export" or runtimeTreebeingundefined),
becauseTreeis exported from@superset/componentsas a named export (the Storybook
story
superset-frontend/packages/superset-ui-core/src/components/Tree/Tree.stories.tsx:21
importsTreefrom a localindexand the docs infrastructure only ever treats
@superset/componentsas a bag of named components, not a default export).
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** docs/developer_docs/components/ui/tree.mdx
**Line:** 260:260
**Comment:**
*Logic Error: The import example for the Tree component uses a default import from the '@superset/components' module, but the components index only provides Tree as a named export, so copying this snippet into real code will fail or not import the component correctly.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
There was a problem hiding this comment.
Same issue as the Slider comment above — fixed in 779d677 alongside all other components that had default imports.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These auto-generated component docs had default imports from '@superset/components' which only exposes named exports. Fixed Slider, Tree, ProgressBar, TableCollection, and Tabs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The sed "s|docs/||g" flag removed ALL occurrences of "docs/" from file paths, mangling "developer_docs/sidebars.js" into "developer_sidebars.js". Use line-by-line processing with "^docs/" to only strip the leading prefix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SUMMARY
Reorganizes the Superset documentation information architecture by splitting the single "Documentation" section into four distinct sections:
/user-docs/) — End-user guides: quickstart, FAQ, creating dashboards, database connections, SQL templating/admin-docs/) — Installation, configuration, security (moved from/docs/configuration/,/docs/installation/,/docs/security/)/developer-docs/) — Contributing, extensions, testing, guidelines, UI components (renamed from/developer_portal/)Key changes:
docs/docs/todocs/admin_docs/developer_portal/todeveloper_docs/with URL path/developer-docs//docs/to/user-docs//docs/*→ new locations,/developer_portal/*→/developer-docs/*)BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — documentation restructuring, no UI changes to the Superset application itself.
TESTING INSTRUCTIONS
cd docs npm install npm run build/docs/configuration/configuring-superset→/admin-docs/configuration/configuring-superset/docs/installation/kubernetes→/admin-docs/installation/kubernetes/developer_portal/contributing/overview→/developer-docs/contributing/overview/docs/quickstart→/user-docs/introADDITIONAL INFORMATION
🤖 Generated with Claude Code