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:
Superset Dev
2026-05-04 08:53:25 -07:00
parent 752ebd47cb
commit 5a5a0e70fc
355 changed files with 3748 additions and 368 deletions

View File

@@ -0,0 +1,58 @@
---
id: clear-the-system-dark-theme
title: "Clear the system dark theme"
description: "Clear the system dark theme"
sidebar_label: "Clear the system dark theme"
hide_title: true
hide_table_of_contents: true
api: eJzFVm1v2zYQ/ivEYcAaTImTvQABi37wMgdtF2zB7GAbIsOlqUukRCJV8uTGE/TfhyNlxXYyFGsG7JNo8u74PPfy0C049LU1Hj3IFr49PuaPtobQEC9VXZeFVlRYM7rz1vCe1zlWile1szU6KqK3Q9+UwYvWNYIET64wt9B1yWbHLu9QE3QJ4IOq6hK3/R7tuwQy9NoVNV8MEqZrT1iJTLl7QTlWKHSJymHGob4/PnkB6gq9V7f472EPjnBlVEO5dcVfmEkxbihHQ/39wuHHpghIn9LadoxMvvt/mZxbtyyyDI0Uf9pGZNZ8TSJXKxQ1uqrwnhmRFUpr9F5QXnjh0NvGaXyO4BCPb/zhRd31H7B7ZwidUaXw6FboBDpnnRRjIxqDDzVqwixuCqt14/6haueKVBntwuUedeMKWoO8buHuE4G8nnfzBEjdepDXMOOG9TBP4OFQ2wynAZoP5qUytyBBX/12AQmUaonl488+rxJ040px+If4aXIxmU1ECjlRLUej0mpV5taTPD0+PR2puhitTkZhQEaN8UgLHwZnwYOTgkjT1Ahx+FakMO4bLyRfih95mpz4anx2NplOF7Nff578kgJ0yQDxck25NVsgh40BZlHV1lHoePTkU5OajbyIN8P2UYYlEr5iKOKLuSTRPUeVofNv2j1GKUiRQs8qBfFN37ILsvdoutQcpKZ2haFXG4RHnhQ1fsEVOtgm/l6t1DSUf4v8zuZjnazxzH/grD6pgsQNks4D3xexbSPlCim3GdOL7bCfC7kxFPtl5qR82FS6jQmZhXx8iB4dfzg5r1PDXGyJR6W93c/RwWvg/t6dijMWZBZn4ffFGhKIoEFCLD4kUCvKQcJnqHN2w7DGcWkcJ//ZHMI+oAs+FhmusLR1hYb6sQ+1jYHa2lmy2padHI1aDtXJlnu4exLtrPFkq02IBFbKFWpZRm3ahOF1hjcqPmcMExJA01QsA/1P/gQx2I3/dja7FEOcLgFGsxtv4PsE3DTqGZ8ZVaGwTry75CDMZTfIs6nq/YN113FtN5o21VG8ZK9sLSxD/5xbVymO9/73GdcomIHsT2FQ5EC6S9h54fDGoc+/NEiXQGFubKSzg76p0XnktFBBLPrbW9w70W51ElPiqVLhqeFcfbZzd+4a3h7CBxrVpSrCyxa6qe1b+hpUXfDFJwyoj/K0seebEl9D2y6VxytXdh1vf2zQ8WMyf+yy8KQkECc8TMI9rkHCWGsMErRSZcO4nryoXMxh+KJgQAL8t2OLzZDwfsEX9EfKrLfCt220iKrBUxJxBFWFbt513d/O2JHE
sidebar_class_name: "delete api-method"
info_path: developer-docs/api/superset
custom_edit_url: null
hide_send_button: true
show_extensions: true
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
import Translate from "@docusaurus/Translate";
<Heading
as={"h1"}
className={"openapi__heading"}
children={"Clear the system dark theme"}
>
</Heading>
<MethodEndpoint
method={"delete"}
path={"/api/v1/theme/unset_system_dark"}
context={"endpoint"}
>
</MethodEndpoint>
Clear the system dark theme
<ParamsDetails>
</ParamsDetails>
<RequestSchema
{...require("./clear-the-system-dark-theme.RequestSchema.json")}
>
</RequestSchema>
<StatusCodes
{...require("./clear-the-system-dark-theme.StatusCodes.json")}
>
</StatusCodes>