rusackas commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3238646428
##########
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:
Good catch — fixed in cb46726 by deleting the override entirely. With
`isVersioned` hard-coded to `false`, every code path below the early-return was
unreachable and the imports were just adding weight. The file's own comment
already said the badge handles versioned sections, so the override had no
remaining purpose. Removing the directory (and the orphaned
`styles.module.css`) lets Docusaurus's default `DocVersionBanner` take over —
the standard "you are viewing an outdated version" banner — with no visible
change. Net: -174 lines.
##########
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:
Right — fixed in cb46726. Comment now enumerates the actual canonical forms
(`/user-docs/...`, `/admin-docs/...`, `/developer-docs/...`, `/components/...`)
and explicitly notes that `/docs/...` is a legacy form handled by per-page
redirects in `docusaurus.config.ts`.
--
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]