Repository navigation
fix(website): repair homepage animation and link interactions - #2701
Conversation
|
|
||
| /* Focused links must scroll into view instead of staying behind the page sheet. */ | ||
| main.pc-home > footer:focus-within { | ||
| position: relative; |
There was a problem hiding this comment.
[P2] When the footer is partially visible, :focus-within can move a link before mouseup, causing the first click to miss. Could we use footer:has(:focus-visible) instead?
There was a problem hiding this comment.
Confirmed on the production export of b18d789 at both 1440px and 390px viewport widths (1000px height). Scroll to 60px above the document bottom and click the visible Changelog link: mousedown focuses it, this rule moves it down by about 60px, and mouseup leaves the page at /zh/ instead of navigating. Overriding only this rule back to position: sticky makes the same first click navigate successfully at both widths. Please preserve pointer activation while fixing keyboard visibility, and cover a first mouse click with the footer partially revealed; the added test currently exercises only Tab/Shift+Tab.
There was a problem hiding this comment.
Fixed in dc94ad748, after integrating master 07f419041. The footer now keeps its sticky position; focus only raises its stacking level above the page sheet. A fixed viewport height bound and internal scrolling keep all links reachable below the header in short windows. None of these geometry rules changes on focus.
I reproduced the original first-click failure on the production export. :has(:focus-visible) alone still moved the target when switching from keyboard to pointer input, so the fix keeps the layout stable across both input modes. The final production export passed all 18 browser cases, including first physical clicks at 60px above the document bottom in English/Chinese at 390px/1440px widths, both with and without prior keyboard focus. The 320×320 and 390×400 cases also passed forward/reverse Tab through every footer link and activation of the first and last links.
The PR description contains the complete validation. Current-head CI has not appeared yet during the ongoing GitHub Webhooks/Actions incident: https://www.githubstatus.com/incidents/121bhnw0ptrb . Please re-review the corrected behavior.
hidb4ai
left a comment
There was a problem hiding this comment.
The footer focus fix introduces a reproducible first-click navigation regression. I added production-page reproduction and control evidence to the existing P2 thread: #2701 (comment). Please address it before merging.
AlexStocks
left a comment
There was a problem hiding this comment.
审查了 b18d789b。hero-demo.tsx 里补 data-step 初始化 / 清理、testimonial-wall.tsx 用 tabIndex={-1} 取代 inert(让可见的重复卡片可点,同时保持 tab 顺序跳过)这两处改动方向都对得上 PR 标题。
下面一条是关于这份新测试本身的实际执行情况——它直接影响「CI 绿了」这件事能证明什么。
|
|
||
| import pytest | ||
|
|
||
| playwright = pytest.importorskip("playwright.sync_api") |
There was a problem hiding this comment.
[P2] 这份回归测试在当前 CI 里必然被跳过,所以 CI 绿灯证明不了首页修复有效
两个前置条件在 CI 里都不成立:
pytest.importorskip("playwright.sync_api")——playwright只声明在[dependency-groups] notebooks里(pyproject.toml:183),没有进dev;而make e2e-test(CI 的tests (x, e2e)job)走的是默认组,装不到 playwright。- 第 41-43 行的
website/out存在性检查 ——website/out在website/.gitignore里,checkout 出来没有;CI 里唯一构建站的check-websitejob(make docs-test)不跑 pytest,testsjob 又不构站。
结果是这个文件在 make e2e-test 里被收集、然后 100% 走 pytest.skip。也就是说 hidb4ai 复现出来的「1440 / 390 宽度下第一次点击落空」这类问题,本来正是这份用例应该拦住的东西,而它从不执行。
建议至少选一条:(a) 给 tests 的 e2e job 加 --group notebooks + pnpm exec playwright install chromium,并让 docs-test 的产物在同一个 job 里可复用;(b) 如果确定只做手工验证,就在模块 docstring 里写明「本文件不在 CI 执行」,别让它看起来是门禁的一部分。当前形态是最容易误读的那种:看着有测试,实际零执行。
There was a problem hiding this comment.
Addressed in dc94ad748. The existing check-website job now installs the locked website-tests dependency group, builds the production export, uses the shared .github/actions/setup-playwright helper, and runs tests/e2e/test_homepage_browser.py in the same job with POWERCONTEXT_TEST_HOMEPAGE_BROWSER=1. In required mode, missing Playwright or export output is an error; a missing Chromium executable also fails the run. Browser traces, screenshots and JUnit output are uploaded for diagnosis. Test-file changes select the website suite, and shared browser-helper changes select both consumers.
The helper preserves the knowledge-base job's browser cache, Ubuntu mirror and upstream fallback; runner routing and dependency versions are unchanged. Local production validation passed 18 browser cases, 39 website tests, 7 blog checks, 275 CI selection/pipeline tests, action pin validation and runner checks. The four original first-click cases failed before the fix and passed after it; mixed-input and short-viewport cases are included as well.
The new head has no GitHub Actions run yet during the current platform incident: https://www.githubstatus.com/incidents/121bhnw0ptrb . These local results and workflow checks do not substitute for the outstanding current-head CI run.
|
Mergeability update: head b18d789 now conflicts with current master 246f70b in website/src/components/home/home.css, confirmed with git merge-tree and GitHub's CONFLICTING status. Please update against master, reconcile the footer behavior, and rerun the browser regressions on the merged result, including the first-click scenario documented in the existing P2 thread. The earlier green CI run does not validate this merge result. The existing footer finding remains unresolved. |
hidb4ai
left a comment
There was a problem hiding this comment.
Re-reviewed dc94ad7. The footer now preserves pointer geometry while keeping focused links visible, and the required homepage browser job addresses the previously skipped coverage. The current production export passed the actual Chromium interaction suite, including mixed-input first clicks and short-viewport keyboard navigation. No remaining actionable defect found. Current-head GitHub Actions validation is still outstanding; this approval does not mark the PR merge-ready.
Problem and change
Follow-up fixes for #2629:
Returning from the docs now restarts the homepage Hero playback. Visible repeated testimonial cards can open their links while their copies remain outside sequential keyboard navigation and screen-reader announcements. Reduced-motion and no-JavaScript presentation retain the completed static illustration.
The homepage footer keeps its sticky position while focus changes. Focused links appear above the page sheet without moving the pointer target between mousedown and mouseup. In short windows, the footer scrolls internally below the fixed navigation so every link remains reachable in both Tab directions. The ordinary unfocused reveal and current homepage styling are preserved.
Browser coverage and CI
The existing
check-websitejob runs the production export and then the homepage browser suite in required mode. The lockedwebsite-testsdependency group and shared Chromium setup provide the prerequisites; missing Playwright, Chromium or export output fails the required run. The shared action preserves the existing browser cache, Ubuntu mirror and upstream fallback used by the knowledge-base job. Runner routing is unchanged. Browser traces, screenshots and JUnit results are retained for diagnosis.The suite covers direct/client navigation, reduced motion, forward/reverse keyboard focus, actual repeated-card link activation, and first physical clicks on a partially revealed footer. First-click cases cover English/Chinese and 390px/1440px widths, both before and after keyboard interaction. Additional 320×320 and 390×400 cases exercise every footer link in both directions and activate the first and last links.
Validation
make docs-test: passed, including 39 website tests, TypeScript checks, production export and validation of 1,148 public pages.uv sync --frozen --group website-tests,POWERCONTEXT_TEST_HOMEPAGE_BROWSER=1 uv run --no-sync pytest tests/e2e/test_homepage_browser.py -q: 18 passed against the production export, with traces, screenshots and JUnit output retained.POWERCONTEXT_TEST_BLOG_SITE=1 uv run pytest tests/e2e/test_blog_site.py -q: 7 passed.make ci-runners-checkand the full pre-commit checks: passed.These browser results establish local Chromium behavior; the updated CI job still requires its own current-head run. The build also reports the existing Next.js dependency advisory; dependency versions are outside this interaction fix.
AI usage
Implemented, tested and independently reviewed with OpenAI Codex assistance.