Copilot commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3238638913


##########
docs/src/theme/DocVersionBanner/index.js:
##########
@@ -37,9 +37,8 @@ export default function DocVersionBannerWrapper(props) {
   const pluginId = activePlugin?.pluginId;
   const [versionedPath, setVersionedPath] = useState('');
 
-  // Only show version selector for tutorials
-  // Main docs, components, and developer_portal use the DocVersionBadge 
component instead
-  const isVersioned = pluginId && ['tutorials'].includes(pluginId);
+  // Versioned sections use the DocVersionBadge component instead of this 
banner
+  const isVersioned = false;
 
   const { preferredVersion } = useDocsPreferredVersion(pluginId);
   const versions = useVersions(pluginId);

Review Comment:
   `isVersioned` is hard-coded to `false`, so the early-return condition `if 
(!isVersioned || ...)` will always short-circuit to the original 
`DocVersionBanner`, making the custom path extraction + dropdown code below 
unreachable at runtime while still keeping the extra imports in the bundle. If 
the intent is to fully deprecate the banner-based version selector, consider 
deleting the dead code and unused imports/state and making this wrapper a 
simple pass-through (or removing the override entirely).



##########
docs/scripts/manage-versions.mjs:
##########
@@ -121,10 +269,12 @@ function addVersion(section, version) {
     banner: 'none'
   };
 
-  // Optionally update lastVersion if this is the first non-current version
-  if (config[section].onlyIncludeVersions.length === 2) {
-    config[section].lastVersion = version;
-  }
+  // Note: we deliberately do NOT auto-bump `lastVersion` to the new
+  // version. Superset's docs site keeps `lastVersion: 'current'` so the
+  // canonical URLs (`/docs/...`, `/admin-docs/...`, etc.) always render
+  // master content; cut versions are accessed only via their explicit
+  // version segment. If you want a different policy, edit

Review Comment:
   This comment calls out canonical docs URLs as `/docs/...`, but the 
Docusaurus config uses `routeBasePath: 'user-docs'` for the main docs plugin 
(with `/docs/*` handled via redirects). To avoid confusing future maintainers, 
update the wording to reference `/user-docs/...` as the canonical path (or 
explicitly mention that `/docs/...` is a legacy redirect).
   



-- 
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]

Reply via email to