fix(pages): add dedicated /features route with correct active-tab highlighting - #548
Conversation
|
✅ OpenCodeReview: No comments generated. Looks good to me. |
How this compares to the existing PRsTwo other PRs are open for this issue: PR #496 (oozan) takes the same approach (dedicated PR #537 (Sunil56224972) uses a hash-based scroll approach ( This PR (#548) is the minimal correct fix:
|
The Features nav link previously navigated to '/' which was indistinguishable from the home page. This adds a dedicated /features route and updates the navbar to use it. Closes alibaba#495 - pages/src/App.tsx: Added /features route pointing to FeaturesPage - pages/src/components/Navbar.tsx: Changed Features nav path from '/' to '/features' - pages/src/components/Navbar.tsx: Updated active tab logic to highlight Features for both '/' and '/features' - Build passes: npm run build compiles successfully - Active tab highlighting: Features tab is active on both '/' and '/features' - All other nav links unchanged and continue to work
b60c70f to
2c9d39f
Compare
Review FeedbackThe approach of adding a dedicated This means clicking "Features" in the navbar still takes the user to the top of the landing page (HeroSection), rather than showing the features content directly — the same UX problem the issue describes. How
|
The /features route now renders FeaturesSection + Footer directly (instead of the full landing page with Hero), matching the pattern used by /benchmark. This means clicking 'Features' in the navbar shows the features content immediately rather than the Hero section. - pages/src/pages/FeaturesRoutePage.tsx: New page component following the BenchmarkPage pattern (FeaturesSection + Footer with paddingTop) - pages/src/App.tsx: /features route now uses FeaturesRoutePage
|
Good catch, that is a fair point. Fixed in ef7e2de. Created // pages/src/pages/FeaturesRoutePage.tsx
const FeaturesRoutePage: React.FC = () => {
return (
<div style={{ paddingTop: 72 }}>
<FadeInSection><FeaturesSection /></FadeInSection>
<FadeInSection><Footer /></FadeInSection>
</div>
);
};The home page (
|
|
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. |
|
Hi @lizhengfeng101
|
|
@varunsahni18 The CLA check is failing because your commits are authored by a different GitHub account than the one that opened this PR.
CLA Assistant checks the commit author's GitHub account, so even though varunsahni18 has signed the CLA, the commits are attributed to VarunOfficialAcc, which hasn't signed it. To fix this, you can either:
|
8de5f14 to
4a775d6
Compare
|
Thanks @lizhengfeng101 |

Summary
Fixes #495
The Features nav link previously navigated to
/which was indistinguishable from the home page. This adds a dedicated/featuresroute and updates the navbar to use it, with correct active-tab highlighting for both/and/features.Changes
pages/src/App.tsx: Added/featuresroute pointing to FeaturesPagepages/src/components/Navbar.tsx: Changed Features nav path from/to/featurespages/src/components/Navbar.tsx: Updated active tab logic so Features is highlighted on both/and/features(the home page IS the features page)Why this over existing PRs
currentPath.startsWith(tab.path)) means the Features tab is NOT highlighted when on/, which is a regression./#features) with 48 additions and 8 deletions, adding scroll logic, useCallback, and wrapper divs. Over-engineered for a simple routing fix.This PR is the minimal correct fix: 2 files, 5 lines added, 2 removed, and the Features tab stays highlighted on the home page.
Testing
npm run typecheck: passes with zero errorsnpm run build: compiles successfullyCloses #495