Skip to content

fix(docs): broken link and add split Get Started with audience links #39467

Open
shantanukhond wants to merge 1 commit intoapache:masterfrom
shantanukhond:feature/docs-get-started-split-nav
Open

fix(docs): broken link and add split Get Started with audience links #39467
shantanukhond wants to merge 1 commit intoapache:masterfrom
shantanukhond:feature/docs-get-started-split-nav

Conversation

@shantanukhond
Copy link
Copy Markdown

@shantanukhond shantanukhond commented Apr 18, 2026

SUMMARY

  • In documentation the centered homepage Get Started control pointed at a path that no longer matched the docs IA; it now sends people to user docs from the main label and offers Users / Admins / Developers from the chevron.
  • The same split control is used in the top navbar so behavior matches the hero.
  • Dropdown styling is aligned with the button width where relevant.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before-changes after-changes

TESTING INSTRUCTIONS

  1. cd docs && yarn start or yarn start:quick.
  2. On the homepage: click Get Started (left) → should open /user-docs/. Click the chevron → menu with Users, Admins, Developers; each link goes to /user-docs/, /admin-docs/, /developer-docs/ respectively.
  3. From any page: use the navbar Get Started the same way.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@github-actions github-actions bot added the doc Namespace | Anything related to documentation label Apr 18, 2026
@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review bot commented Apr 18, 2026

Code Review Agent Run #e283e9

Actionable Suggestions - 0
Review Details
  • Files reviewed - 7 · Commit Range: 34cbc01..34cbc01
    • docs/docusaurus.config.ts
    • docs/src/components/GetStartedSplitButton.tsx
    • docs/src/pages/index.tsx
    • docs/src/styles/main.css
    • docs/src/theme/NavbarItem/ComponentTypes.tsx
    • docs/src/theme/NavbarItem/GetStartedSplitNavbarItem.tsx
    • docs/src/theme/Root.js
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • Eslint (Linter) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@shantanukhond
Copy link
Copy Markdown
Author

If any changes or suggestions required you can let me know. Thank you

Comment thread docs/src/theme/Root.js
Comment on lines +150 to +152
const mainLink = button.querySelector('a.split-main');
const href =
mainLink?.getAttribute('href') || button.getAttribute('href') || '';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The new CTA tracking logic always falls back to the split button's main link, so clicking the chevron trigger (which only opens the dropdown) is incorrectly recorded as a /user-docs/ click. Use the actually clicked anchor first, and only fall back to the element's own href, so analytics reflects real navigation targets. [logic error]

Severity Level: Major ⚠️
- ⚠️ Matomo CTA metrics misreport dropdown-trigger clicks as /user-docs/.
- ⚠️ Homepage Get Started menu usage statistics become inaccurate.
- ⚠️ Navbar Get Started split-button interactions tracked with wrong targets.
Suggested change
const mainLink = button.querySelector('a.split-main');
const href =
mainLink?.getAttribute('href') || button.getAttribute('href') || '';
const clickedLink = event.target.closest?.('a');
const href =
clickedLink?.getAttribute('href') || button.getAttribute('href') || '';
Steps of Reproduction ✅
1. Start the docs site using `cd docs && yarn start` as described in the PR, which serves
the homepage from `docs/src/pages/index.tsx`.

2. On the homepage, locate the hero "Get Started" split button rendered by
`GetStartedSplitButton` at `docs/src/pages/index.tsx:707-710`, which uses the component
from `docs/src/components/GetStartedSplitButton.tsx:124-135` (main link `<Link
to="/user-docs/" className="split-main">` at line 132 and dropdown trigger `<button
className="split-dropdown-trigger">` at lines 25-32).

3. Click directly on the chevron dropdown trigger (the button with
`className="split-dropdown-trigger"`) in the hero, not on the "Get Started" text. This
click is inside the `.default-button-theme` container
(`rootClassName="default-button-theme get-started-split"` in `index.tsx:709`), so the
global click handler registered in `docs/src/theme/Root.js` at lines 284-287
(`document.addEventListener('click', handleCTAClick);`) runs.

4. In `handleCTAClick` at `docs/src/theme/Root.js:146-75`, `button` becomes the outer
`.default-button-theme` element, `mainLink = button.querySelector('a.split-main')` finds
the `/user-docs/` anchor, and `href` is set to that `/user-docs/` URL even though the
chevron click only opens the `Dropdown` (no navigation). As a result, `trackEvent('CTA',
'Click', `${buttonText} - ${href}`);` logs the event as a `/user-docs/` CTA click. The
same mis-attribution occurs when clicking the navbar "Get Started" chevron rendered via
`docs/src/theme/NavbarItem/GetStartedSplitNavbarItem.tsx:23-26` (root class
`default-button-theme get-started-split get-started-button`), since the handler logic is
identical. The suggested change to derive `href` from `event.target.closest('a')` would
correctly leave `href` empty for chevron clicks, matching the fact that no navigation
occurs.

Fix in Cursor | Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** docs/src/theme/Root.js
**Line:** 150:152
**Comment:**
	*Logic Error: The new CTA tracking logic always falls back to the split button's main link, so clicking the chevron trigger (which only opens the dropdown) is incorrectly recorded as a `/user-docs/` click. Use the actually clicked anchor first, and only fall back to the element's own `href`, so analytics reflects real navigation targets.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
👍 | 👎

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 18, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 34cbc01
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/69e30962a46a5d0008262766
😎 Deploy Preview https://deploy-preview-39467--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

* under the License.
*/
import GetStartedSplitButton from '../../components/GetStartedSplitButton';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The split button relies on classes defined in main.css, but that stylesheet is only imported on the homepage, so opening any non-homepage route directly renders an unstyled/broken navbar control. Import the stylesheet in this navbar item (or the shared button component) so styles are always loaded wherever the navbar renders. [possible bug]

Severity Level: Major ⚠️
- ⚠️ Navbar Get Started button unstyled on deep-linked docs pages.
- ⚠️ Dropdown menu for Get Started lacks intended gradient theming.
- ⚠️ Inconsistent hero vs navbar CTA appearance across documentation.
Suggested change
import '../../styles/main.css';
Steps of Reproduction ✅
1. Start the docs site using the PR instructions: from `/workspace/superset/docs`, run
`yarn start` (or `yarn start:quick`) so Docusaurus serves the documentation.

2. In a fresh browser session, directly open a non-homepage docs route, for example
`http://localhost:3000/user-docs/using-superset/creating-your-first-dashboard` (this route
is linked from `docs/quickstart.mdx:76` via
`/user-docs/using-superset/creating-your-first-dashboard`).

3. Docusaurus config at `docs/docusaurus.config.ts:895-898` adds a navbar item with `type:
'custom-getStartedSplit'`, which is resolved by
`docs/src/theme/NavbarItem/ComponentTypes.tsx:30-40` to `GetStartedSplitNavbarItem`,
implemented in `docs/src/theme/NavbarItem/GetStartedSplitNavbarItem.tsx:19-26` and
rendering `GetStartedSplitButton` with `rootClassName="default-button-theme
get-started-split get-started-button"`.

4. The styles for `.default-button-theme`, `.get-started-split`, the dropdown menu, and
navbar-specific sizing are defined only in
`docs/src/styles/main.css:74-165,114-141,149-165`, which is imported exclusively by the
homepage component `docs/src/pages/index.tsx:31-32` (`import '../styles/main.css';`).
Because the `/user-docs/...` route does not load `index.tsx`, `main.css` is not included
on initial render, so the navbar "Get Started" split button appears without its gradient
background, sizing, and dropdown theming until the homepage is visited, demonstrating that
the navbar component relies on CSS that is not loaded on non-homepage routes.

Fix in Cursor | Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** docs/src/theme/NavbarItem/GetStartedSplitNavbarItem.tsx
**Line:** 20:20
**Comment:**
	*Possible Bug: The split button relies on classes defined in `main.css`, but that stylesheet is only imported on the homepage, so opening any non-homepage route directly renders an unstyled/broken navbar control. Import the stylesheet in this navbar item (or the shared button component) so styles are always loaded wherever the navbar renders.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
👍 | 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Namespace | Anything related to documentation size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant