Repository navigation
π mobile-shots: phone-ergonomics probe measures the progress pill's extended hit area - #17195
Conversation
β¦xtended hit area Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Changelog: this PR changes code but carries no changelog entry If it is user-visible β a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
There was a problem hiding this comment.
The pill case is right, but hitRect also shrinks controls whose ::before has positive insets, and there are three of those in the section β so the probe would still fail at 390Γ844, just with different names.
Verified against v5:
tracker.css:939.ham-pill { position: relative; min-height: var(--control-compact-min-h) β¦ }and:942.ham-pill::before { content: ""; position: absolute; inset: calc((var(--control-compact-min-h) - var(--tap-target)) / 2) 0; }β top/bottom resolve to β11px, so22 β (β11) β (β11) = 44. β That part does what the body says.config-dialog.css:417.config-info { β¦ position: relative; }andresponsive.css:397-400(inside@media (max-width: 768px), line 45):With.config-info::before { content: ""; position: absolute; inset: calc((var(--tap-target) - var(--tap-ring)) / 2); β¦ }
--tap-target: 44pxand--tap-ring: 28px(base.css:45), that is +8px on every side.sections.js:80-82inject three<button class="config-info section-settings-gear ham-header-tool β¦">into the section header;tracker.css:1093(inside themax-width: 640pxphone tier at:1082) sizes#activity-monitor-section .ham-header-tooltovar(--tap-target)= 44Γ44. They arebuttonelements, not excluded byinlineText/stripCell, so they are incontrols.
For those three, hitRect returns 44 β 8 β 8 = 28 in both axes and small gets button.config-info.section-settings-gear.ham-header-tool.β¦ 28Γ28 three times. (tracker.css:501 only suppresses the ring for .ham-chevron-info.config-info, which the probe already excludes; .ham-acted.config-info at tracker-row-acted.js:168 has tabindex="0" and the same ring, so it is affected too.)
Suggested fix (one line): a pseudo box that sits inside the painted box does not reduce the tap target, so take the union rather than the pseudo rect:
return { width: Math.max(r.width, r.width - px(b.left) - px(b.right)), height: Math.max(r.height, r.height - px(b.top) - px(b.bottom)) };or equivalently only apply the adjustment when the insets are negative.
Everything else in the diff β the position === 'static' guard, the content !== '""' check, leaving width alone for the pill β reads correctly to me.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Summary
After #17193 and #17183 both landed on v5, the
tracker-phone-ergonomicsprobe fails at 390Γ844 for every dashboard PR: the progress pill (#17183) paints at the 22px compact control height and extends its tap target to--tap-targetwith an absolutely positioned empty::before, but the probe measuredgetBoundingClientRect()of the painted box and reported 17 controls under 44Γ44 (seen on #17193's last mobile-shots run before it merged).The probe now measures the hit area: when a control has an absolutely positioned empty
::before, its negative insets grow the measured rect. For the pill, 22px + 2 Γ 11px = 44px. Controls without that pattern are measured as before.Test-only (
webstatic/testdata/), henceno-changelog.