fix(homepage): broken CTA link#39097
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes the homepage’s primary “Get Started” CTA so it routes to the current User Docs entry point, aligning with the docs site’s routeBasePath: 'user-docs' configuration.
Changes:
- Update the homepage CTA link target from
/docs/introto/user-docs/.
| </div> | ||
| <img src="/img/community/line.png" alt="line" /> | ||
| <StyledButton className="default-button-theme" href="/docs/intro"> | ||
| <StyledButton className="default-button-theme" href="/user-docs/"> |
There was a problem hiding this comment.
StyledButton is a styled @docusaurus/Link, which should use the to prop for internal navigation. Using href can bypass Docusaurus routing/baseUrl handling and is inconsistent with other internal links in this file (e.g. to={href} on StyledDocSectionCard). Switch this to to="/user-docs/".
| <StyledButton className="default-button-theme" href="/user-docs/"> | |
| <StyledButton className="default-button-theme" to="/user-docs/"> |
| </div> | ||
| <img src="/img/community/line.png" alt="line" /> | ||
| <StyledButton className="default-button-theme" href="/docs/intro"> | ||
| <StyledButton className="default-button-theme" href="/user-docs/"> |
There was a problem hiding this comment.
Suggestion: StyledButton is built on Docusaurus Link, and internal navigation should use the to prop instead of href. Using href here bypasses the router semantics for internal links and can break base-url-aware routing behavior; switch to to to keep navigation consistent with the rest of the page. [logic error]
Severity Level: Major ⚠️
- ⚠️ Homepage "Get Started" CTA triggers full page reload.
- ⚠️ CTA bypasses Docusaurus router and SPA navigation behavior.
- ⚠️ Inconsistent link pattern vs other internal docs links.| <StyledButton className="default-button-theme" href="/user-docs/"> | |
| <StyledButton className="default-button-theme" to="/user-docs/"> |
Steps of Reproduction ✅
1. Build and run the Docusaurus docs site using the configuration at
`docs/docusaurus.config.ts:263` (where `baseUrl` is defined) which serves the homepage
component from `docs/src/pages/index.tsx`.
2. Open the homepage route `/`, which is implemented by `export default function Home():
JSX.Element` at `docs/src/pages/index.tsx:606`.
3. In the hero section, locate the "Get Started" CTA button rendered from `StyledButton`
at `docs/src/pages/index.tsx:720`, where `StyledButton` is defined as `styled(Link)` at
`docs/src/pages/index.tsx:194` and is invoked with `href="/user-docs/"` instead of
`to="/user-docs/"`.
4. Click the "Get Started" button and observe (via browser dev tools/network) that
navigation to `/user-docs/` occurs as a full-page navigation driven by the `href`
attribute rather than client-side routing via Docusaurus `Link.to`, meaning this CTA
bypasses router semantics and SPA behavior, unlike other internal links on the same page
that use `to` (e.g., `StyledDocSectionCard` at `docs/src/pages/index.tsx:745`).Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** docs/src/pages/index.tsx
**Line:** 720:720
**Comment:**
*Logic Error: `StyledButton` is built on Docusaurus `Link`, and internal navigation should use the `to` prop instead of `href`. Using `href` here bypasses the router semantics for internal links and can break base-url-aware routing behavior; switch to `to` to keep navigation consistent with the rest of the page.
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.
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
I just saw that this is also fixed by #39077 |
There was a problem hiding this comment.
Code Review Agent Run #ed35aa
Actionable Suggestions - 1
-
docs/src/pages/index.tsx - 1
- Incorrect Link Prop for Internal Route · Line 720-720
Review Details
-
Files reviewed - 1 · Commit Range:
69980c9..69980c9- docs/src/pages/index.tsx
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ 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
| </div> | ||
| <img src="/img/community/line.png" alt="line" /> | ||
| <StyledButton className="default-button-theme" href="/docs/intro"> | ||
| <StyledButton className="default-button-theme" href="/user-docs/"> |
There was a problem hiding this comment.
The StyledButton uses Docusaurus Link, which requires 'to' for internal routes like '/user-docs/', not 'href'. Using 'href' causes a full page reload instead of SPA navigation, degrading user experience. Based on Docusaurus 3.9.2 docs, internal links should use 'to'.
Code suggestion
Check the AI-generated fix before applying
| <StyledButton className="default-button-theme" href="/user-docs/"> | |
| <StyledButton className="default-button-theme" to="/user-docs/"> |
Code Review Run #ed35aa
Should Bito avoid suggestions like this for future reviews? (Manage Rules)
- Yes, avoid them
SUMMARY
The most prominent call to action link on the homepage is broken.. Pitching SuperSet it to a CTO and it's the first link he clicks.. :(
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
Go to homepage, click the first "Get Started" button you see.