rusackas commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3238610632
##########
docs/scripts/manage-versions.mjs:
##########
@@ -30,9 +30,11 @@ const __dirname = path.dirname(__filename);
const CONFIG_FILE = path.join(__dirname, '..', 'versions-config.json');
// Parse command line arguments
-const args = process.argv.slice(2);
+const rawArgs = process.argv.slice(2);
+const skipGenerate = rawArgs.includes('--skip-generate');
+const args = rawArgs.filter((a) => a !== '--skip-generate');
const command = args[0]; // 'add' or 'remove'
-const section = args[1]; // 'docs', 'developer_portal', or 'components'
+const section = args[1]; // 'docs', 'developer_docs', or 'components'
Review Comment:
Valid — fixed in 8ef030a. The inline comment now reads `'docs',
'admin_docs', 'developer_docs', or 'components'` to match the supported set
elsewhere in the script.
##########
docs/src/theme/DocVersionBadge/index.js:
##########
@@ -40,8 +40,8 @@ export default function DocVersionBadge() {
const isVersioned = [
'default', // main docs
'components',
- 'tutorials',
- 'developer_portal',
+ 'admin_docs',
+ 'developer_docs',
].includes(pluginId);
Review Comment:
Confirmed — fixed in 8ef030a. The bug is actually broader than this PR: only
the `components` plugin has matching pluginId / routeBasePath values. The
`default` plugin serves at `/user-docs` (not `/docs` as the old conditional
assumed), and `admin_docs` / `developer_docs` use hyphens in their URLs even
though the plugin ids use underscores. The pre-existing default-plugin bug was
masked by the previous `isVersioned` list referencing stale `tutorials` /
`developer_portal` ids that never matched anything — so the broken default
branch never executed in practice. Replaced the conditional with an explicit
`PLUGIN_ID_TO_BASE_PATH` map covering all four sections; comment points at
`docusaurus.config.ts` so the map stays in sync if a routeBasePath ever changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]