W13-C2: Pair selector causes layout shift (CLS 0.12) — content jumps when dropdown opens #181
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#181
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue Summary
Opening the pair selector dropdown causes visible content to shift position on the page. Chrome Lighthouse measures a Cumulative Layout Shift (CLS) of 0.12 (needs improvement; threshold: under 0.1 is good). The shift is triggered by the pair selector button itself (
button#trade-pair-select.token-select-trigger), which is recorded as the worst offender in the Lighthouse layout shift report.Reproduction Steps
Expected Behavior
Opening the pair selector dropdown should not cause any other content on the page to move. The dropdown should appear without shifting the layout.
Actual Behavior
Environment Details
localterra(local Docker)VITE_NETWORK=local npm run devatlocalhost:3000How to Verify When Fixed
Severity / Impact
P3 Polish. Layout shifts are disorienting and unprofessional, particularly on a trading interface where precise clicking matters. A CLS of 0.12 is noticeable. Found under W13-C2 (Performance — interaction latency and visual stability).
cc: @PlasticDigits
mentioned in issue #116
mentioned in commit
02185e60ccFix landed on
main(e07b253)Summary: Opening
#trade-pair-selecton/tradeno longer shifts surrounding layout. CLS drivers addressed: synchronous fixed portal positioning on first open frame, reserved focus-ring footprint on.token-select-trigger,.token-select-rootlayout containment,scrollbar-gutter: stableonhtml, and trade pair shellshrink-0.Code:
portalListboxPosition.ts,PortalListbox.tsx,MenuSelect/TokenSelectwrappers,index.css,TradePage.tsx.Docs / agent playbooks: docs/frontend.md § Portal listboxes — layout stability,
skills/AGENTS_FRONTEND_PORTAL_LISTBOX_CLS.md(cross-linked from trade layout + a11y focus skills).Automated checks (527 unit tests passed locally):
portalListboxPosition.test.ts; Playwrighte2e/trade-pair-select-cls.spec.ts(needs LocalTerra + LCD + indexer).Verification checklist
git pull→mainate07b253or laterVITE_NETWORK=local npm run dev→ open/tradeat ~1440px desktop#trade-pair-select) — chart, order book, and ticket columns do not jumpcd frontend-dapp && npm run test:e2e -- e2e/trade-pair-select-cls.spec.ts --workers=1@totdking — please verify on your M1 / Chrome 148 setup (W13-C2). Leaving the issue open until sign-off.
mentioned in issue #179
qa cleared source+test layer @PlasticDigits
verified
e07b253is on main.portalListboxPosition.test.ts 3/3 PASS (computePortalListboxStyle: opens below, flips above when tight, clamps horizontally inside viewport).
Browser walk + Lighthouse CLS + Playwright e2e deferred to @totdking on his M1 / Chrome 148 setup per your note above.
mentioned in issue #144
mentioned in issue #214
mentioned in issue #524
mentioned in issue #527
mentioned in issue #528
mentioned in issue #561
mentioned in issue #632
mentioned in issue #659
mentioned in issue #672