Repository navigation
fix(web): show the Featured hero arrows on wide touch screens - #4510
Conversation
At 1024px and wider the hero's previous/next arrows started hidden and only appeared on hover, so on a touch screen in that range (an iPad in landscape) they never appeared. Hide them at rest only when the observed pointer can hover, the same data-fine-pointer gate the app's hover styles use.
|
Warning Review limit reachedThis organization requires a seat for paid usage-based reviews, including automatic and on-demand reviews. Ask an admin to assign a seat or enable paid usage-based reviews for users without a seat in Billing. Next included review available in 9 minutes. View limit details
|
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
| type="button" | ||
| onClick={prev} | ||
| className="glass-subtle absolute start-3 top-1/2 z-20 -translate-y-1/2 rounded-full p-1.5 opacity-60 transition-opacity duration-(--duration-fast) hover:opacity-100 sm:start-5 sm:p-2 sm:opacity-80 lg:opacity-0 lg:group-hover:opacity-90" | ||
| className="glass-subtle absolute start-3 top-1/2 z-20 -translate-y-1/2 rounded-full p-1.5 opacity-60 transition-opacity duration-(--duration-fast) hover:opacity-100 sm:start-5 sm:p-2 sm:opacity-80 lg:group-hover:opacity-90 lg:[:where(:root[data-fine-pointer=true])_&]:opacity-0" |
There was a problem hiding this comment.
Non-hovering pen input hides the navigation arrows
On wide touchscreens, a non-hovering pen press sets data-fine-pointer to true, making both arrows disappear. Distinguish hover-capable pointers from non-hovering pens before hiding the arrows.
Prompt for LLM
File web/src/components/HeroBanner.tsx, line 425:
Non-hovering pen input hides the navigation arrows
A pen press sets `data-fine-pointer` to `true` even on devices whose pen cannot hover, so both arrows disappear after the user interacts with a wide touchscreen using that pen. Distinguish hover-capable pointers from non-hovering pens before applying the hidden state.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
There was a problem hiding this comment.
The mechanism is right: initPointerCapability treats a pen pointer like a mouse and sets data-fine-pointer to true, so on a 1024px+ screen a pen that can't hover leaves the arrows hidden until the hero is hovered.
That is also what happens on main today, where the arrows are hidden on lg for every input. I checked the compiled CSS for both class lists in Chromium at 1180px: with the flag true both read opacity 0 at rest and 0.9 on hover, so pen users see no change from this PR. The PR names this case under Risks. Whether a pen that can't hover should count as a fine pointer is an app-wide question for pointerCapability.ts, which this PR doesn't touch, so nothing changes here.
🤖 Claude Code (claude-opus-5-5)
There was a problem hiding this comment.
Agreed: this is a pre-existing limitation, not a regression introduced by the PR. The evidence you describe shows that non-hovering pen users get the same arrow behavior before and after the change, and the PR explicitly documents the limitation.
The original suggestion identifies a real gap in pen accessibility, but it does not need to block this focused improvement for touch users. It would be reasonable to track non-hovering pen behavior separately, whether the eventual fix is local to the hero or part of the app-wide pointer-capability handling.
Review summaryReviewed head: Fit: 9/10 · Readiness: 9/10 — ready Fit: this fixes a real gap in the home page on wide touch screens, where the hero couldn't be navigated at all with reduced motion on. It reuses the app's existing observed-pointer flag rather than adding a new mechanism or a setting. Readiness: the change is two class lists, and the compiled CSS does what the description says. I compiled both the base and head class lists with the repository's Tailwind and
The new hide compiles to Other feedback
Follow-up
Checks
🤖 Claude Code (claude-opus-5-5) |
Problem
Related issue: #327
Validation tasks: none
Other clients: Apple N/A (web-only styling); Android N/A (web-only styling); Roku N/A (web-only styling)
On a touch screen 1024px or wider, such as an iPad in landscape, the previous and next arrows on the home page's Featured hero never appear. At that width the arrows start hidden and only fade in when a mouse hovers the hero, and a touch screen never hovers. The only way to change slides is to wait for autoplay, and with reduced motion on, autoplay is off too. iPad portrait works because the arrows stay visible below 1024px.
This change keeps the arrows visible on touch input at every width. With a mouse they still stay hidden until the hero is hovered.
The issue also asks for swipe gestures on the hero. That is a new feature and is not part of this change, so #327 stays open for it.
Approach
The 1024px-and-up hide now applies only when the app has seen a pointer that can hover. It uses the same
data-fine-pointerattribute (web/src/lib/pointerCapability.ts) that the app'shover:variant already uses. A plain@media (hover: hover)query would be wrong on the Windows hybrid machines that attribute was added for. The selector sits inside:where(), as the comment inweb/src/app.cssrequires, sogroup-hoverandhoverstill win over it.On a hybrid laptop, the last pointer used decides: after a touch the arrows stay visible, and after the mouse moves they go back to showing on hover.
Validation
pnpm run lint,format:check,build,budget:checkandmake test-webpass.make verify-local-paths,verify-size-ratchet,verify-bidiandverify-case-collisionspass. The Go half of the gate was not run because no Go code changed.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-4510/
Surface and build: web app home page, Featured hero; touch at 1180px and 1440px, mouse desktop at 1440px, phone at 390px.
Risks
A touch tablet with a paired mouse, trackpad or stylus hides the arrows again after that device is used, until the next finger touch. This is how every
hover:style in the app already behaves.Checklist
AI Disclosure