chrome: navbar home-route check assumes single locale, no basePath
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- next.js, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Read components/site/Chrome.tsx and next.config.ts to understand the current route assumptions. The issue describes work to do before adding locale routing, a basePath, or another prefix rewriting layer; first check whether any of those are planned. Done means every home route check in Chrome.tsx handles the chosen routing setup without restoring the navbar tone bug described in #112.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Tracking comment from Gemini's review of #114.
Background
After #114, components/site/Chrome.tsx derives the navbar tone from:
const effectiveActive = pathname === "/" && scrolled ? active : "intro";
The pathname === "/" literal is correct today — the static export ships a single locale and next.config.ts has no basePath. If we ever add either, this check (and any other Chrome.tsx guard that conflates "home" with the literal "/" route) will silently mis-fire and the original #112 symptom returns: the navbar paints in a dark-section tone on what is functionally the home page.
When this matters
Before adding any of:
- i18n routing (
/en/,/de/, …) - a
basePathinnext.config.ts - any other prefix-rewriting layer that changes the home pathname
…audit components/site/Chrome.tsx for pathname === "/" and replace it with a routing-aware home check (e.g. strip locale prefix from pathname before comparing, or thread the home route through a config helper).
Out of scope for #114; filed so the assumption is documented and discoverable.
- Ngôn ngữ chính
- TypeScript
- Star
- 3
- Fork
- 0
- Merge trung bình
- 12 giờ 41 phút
- Pull request đã merge (30 ngày)
- 70
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của decdn/website
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug med-priority
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement low-priority
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 54/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement low-priority
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của decdn/website
Issue tương tự
-
area:agent-view area:tui bug platform:macos
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
anthropics/claude-code#104558 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[CURRICULUM] computation fakdĐang mởupdater
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
UniversityOfHelsinkiCS/oodikone#5141 ·
-
maintanance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
inmanta/web-console#7606 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug skills
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
equinor/fusion-framework#5846 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100