mirror of
https://github.com/apache/superset.git
synced 2026-05-08 17:35:33 +00:00
fix(docs): regenerate 6.1.0 snapshots with depth-aware import rewriter
The previous import-path fixer only matched two-level relative paths (`../../src/` and `../../data/`), missing files at deeper nesting in the section tree. After the 6.1.0 cut for developer_docs, ~50 component MDX files at depth 3 still referenced `../../../src/components/StorybookWrapper` (should have been `../../../../src/...`), and the components Button page referenced `../../../superset-frontend/...` (should have been `../../../../superset-frontend/...`). The Docusaurus production build failed with module-not-found errors as a result. Replace the pattern-specific regex with a depth-aware walker that - counts the file's nesting depth within the snapshot, - bumps any relative import whose `../` count exceeds that depth (i.e. the import escapes the section root and so must compensate for the extra `version-X.X.X/` directory the snapshot lives under), - skips fenced code blocks so documented sample imports (e.g. Playwright page-object examples in developer_docs/testing/e2e-testing.md) are not rewritten. Re-cut all four sections under the new fixer. yarn build now passes locally.
This commit is contained in:
@@ -22,7 +22,7 @@ sidebar_label: DropdownContainer
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# DropdownContainer
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Flex
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Flex
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Grid
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Grid
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Layout
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Layout
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: MetadataBar
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# MetadataBar
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Space
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Space
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Table
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Table
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Alert
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Alert
|
||||
|
||||
@@ -108,12 +108,12 @@ function Demo() {
|
||||
## Import
|
||||
|
||||
```tsx
|
||||
import { Alert } from 'packages/superset-core/src/ui/components/Alert';
|
||||
import { Alert } from 'packages/superset-core/src/components/Alert';
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
:::tip[Improve this page]
|
||||
This documentation is auto-generated from the component's Storybook story.
|
||||
Help improve it by [editing the story file](https://github.com/apache/superset/edit/master/superset-frontend/packages/superset-core/src/ui/components/Alert/Alert.stories.tsx).
|
||||
Help improve it by [editing the story file](https://github.com/apache/superset/edit/master/superset-frontend/packages/superset-core/src/components/Alert/Alert.stories.tsx).
|
||||
:::
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: AutoComplete
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# AutoComplete
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Avatar
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Avatar
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Badge
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Badge
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Breadcrumb
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Breadcrumb
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Button
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls, ComponentGallery } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls, ComponentGallery } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Button
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: ButtonGroup
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# ButtonGroup
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: CachedLabel
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# CachedLabel
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Card
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Card
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Checkbox
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Checkbox
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Collapse
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Collapse
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: DatePicker
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# DatePicker
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Divider
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Divider
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: EditableTitle
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# EditableTitle
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: EmptyState
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls, ComponentGallery } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls, ComponentGallery } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# EmptyState
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: FaveStar
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# FaveStar
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: IconButton
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# IconButton
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Icons
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Icons
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: IconTooltip
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# IconTooltip
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: InfoTooltip
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# InfoTooltip
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Input
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Input
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Label
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Label
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: List
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# List
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: ListViewCard
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# ListViewCard
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Loading
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Loading
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Menu
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Menu
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Modal
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Modal
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: ModalTrigger
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# ModalTrigger
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Popover
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Popover
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: ProgressBar
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# ProgressBar
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Radio
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Radio
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: SafeMarkdown
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# SafeMarkdown
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Select
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Select
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Skeleton
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Skeleton
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Slider
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Slider
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Steps
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Steps
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Switch
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Switch
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: TableCollection
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# TableCollection
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: TableView
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# TableView
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Tabs
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Tabs
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Timer
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Timer
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Tooltip
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Tooltip
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Tree
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Tree
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: TreeSelect
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# TreeSelect
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Typography
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Typography
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: UnsavedChangesModal
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# UnsavedChangesModal
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ sidebar_label: Upload
|
||||
under the License.
|
||||
-->
|
||||
|
||||
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
|
||||
import { StoryWithControls } from '../../../../src/components/StorybookWrapper';
|
||||
|
||||
# Upload
|
||||
|
||||
|
||||
Reference in New Issue
Block a user