fix: /trade Place limit CTA floats mid-ticket on Chrome — dock money CTAs to panel bottom #527
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#527
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?
Summary
On Chrome, the
/tradeorder-ticket Place limit money CTA (data-testid="trade-limit-submit") floats mid-panel and sits on top of live form controls (Pay % chips above, Expiry No expiry / 24h / 7d below) instead of docking to the bottom of the ticket column.This is one product surface: ticket money-CTA chrome. Bundle Limit + Market docking in this issue. Do not split “Chrome sticky bug” vs “align to bottom” vs “Market tab footer” into separate issues.
Related: #348 (CTA must stay visible without hunting), #500 (opaque sticky footer + guards in flow + scroll clearance), #482 (same opacity class on sticky header), #146 (desktop / tablet / phone workspace), #417 (money CTA sizing).
Evidence
Desktop
/trade(Chrome). Reporter circled PLACE LIMIT floating between Balance / 25%–100% and Expiry chips. Chart + Collapse tape control visible on the left — desktopreact-resizable-panelsworkspace, not/limits.Current codebase
/trademounts a singleTradeOrderTicket(desktoplg+PanelGroupor sub-desktop grid — #178). The ticket card isflex flex-col h-full min-h-0. Header (Buy/Sell + wallet chip) is outside the scrollport. The body is:.trade-limit-submit-stickyisposition: sticky; bottom: 0; z-index: 10with layeredvar(--panel-bg-strong), var(--bg-1)+ backdrop blur (#500). Negative horizontal margins pull it to the scrollport edges.--trade-limit-sticky-clearanceadds end padding /scroll-padding-bottomso Expiry / Advanced can scroll clear.position: sticky; bottom: 0only pins when the sticky containing block is the intended scrollport and the element would otherwise leave that box. Nested flex (flex flex-1 flex-col) +overflow-y-auto+react-resizable-panelsis a known Chromium sticky containing-block failure: the CTA sticks to a mid-ticket box (or overlays Pay/Receive/Expiry) instead of the visual bottom of the column. When content is shorter than the panel, sticky also does not act likemargin-top: auto— it stays in flow, which reads as “floating”.trade-market-submitis in-flow insideTradeMarketOrderPaneland can fall below the fold in a tall ticket (#348 regression risk if we only fix Limit)./limitsbtn-primary btn-cta— no sticky class. Out of scope unless a helper is shared.TradePage.test.tsxasserts DOM order (guards precede sticky).e2e/trade-page-responsive.spec.tschecks opacity, hit-test, and expiry clearing the footer — it does not assert the CTA’s bottom edge aligns with the ticket column on Chrome at scroll-top.Playbook:
skills/AGENTS_FRONTEND_TRADE_LIMIT_STICKY_CTA.md. Spec:docs/frontend.md§ Trade page — limit ticket sticky CTA.Why this is needed
stickyinside this flex scrollport is the wrong primitive if Chrome paints the footer mid-column.Constraints / guardrails
position: fixed. A viewport-fixed CTA escapes the ticket, covers the mobile tab bar / legal footer / wallet modal, and can sit over other routes. Keep the footer inside the ticket card.lg+, ~1280×720) and tablet chart|ticket row, Place limit / Update price / Market buy|sell / Connect Wallet must be visible in the ticket column without scrolling the ticket body.var(--bg-1)undervar(--panel-bg-strong)+ blur). No missing tokens (--card) and no translucent mix that lets ADVANCED / fee rows bleed through.datetime-local).place_limit_order/ allowance sequence, invert convert-on-submit (#524), crossing preflight, pause / blacklist disable, or gas gates. Layout only.data-testids:trade-limit-submit-sticky(or rename and update every test + skill +docs/frontend.mdin the same MR),trade-limit-submit,trade-limit-update-price-submit,trade-limit-inline-guards,trade-order-ticket-scroll,trade-market-submit.TradeOrderTicketto “fix” layout (#178).btn-primary/TRADE_MONEY_CTA_CLASS. Tokens--ink,--line,--bg-1,--panel-bg-strong. No*-neoclasses (#488). Light + dark both opaque enough that form copy cannot be read through the footer.token0/token1/ rawbid/askin retail chrome (#489)./limitsstandalone is out of scope unless it shares a new footer helper. Do not add sticky/fixed chrome there.PanelResizeHandlepointer events.#trade-pair-select— #181). Do not raisez-indexto “win” against those surfaces.disabled(no overlay that looks enabled).Relevant files
frontend-dapp/src/components/trade/TradeOrderTicket.tsxfrontend-dapp/src/components/trade/TradeMarketOrderPanel.tsxfrontend-dapp/src/index.css.trade-order-ticket-scroll,.trade-limit-submit-sticky,--trade-limit-sticky-clearancefrontend-dapp/src/pages/TradePage.tsxPanelvs sub-desktop ticket column heightsfrontend-dapp/src/theme-dark.css/theme-light.css--bg-1/--panel-bg-strongfrontend-dapp/src/pages/TradePage.test.tsxfrontend-dapp/e2e/trade-page-responsive.spec.tsdocs/frontend.md§ Trade page — limit ticket sticky CTAskills/AGENTS_FRONTEND_TRADE_LIMIT_STICKY_CTA.mdskills/AGENTS_FRONTEND_TRADE_PAGE_LAYOUT.mdRecommended direction
Replace sticky-inside-scroll with a true ticket footer (flex/grid), which Chromium handles reliably:
flex+shrink-0overposition: sticky/absolute/fixed. If a short form leaves empty space, the footer still sits on the bottom edge of the ticket column.--trade-limit-sticky-clearancepadding is usually unnecessary — drop or retune it so you do not get a large dead gap above My open limits.docs/frontend.md+ the #500 playbook in the same MR: “sticky CTA” becomes “ticket footer CTA”; keep opacity / guards-in-flow / visibility invariants.Acceptance criteria
trade-limit-inline-guardsis not a descendant of the footer. After scrolling Expiry /datetime-localinto view in the ticket body, those controls sit above the footer and remain clickable / typeable.disabledunchanged.docs/frontend.md+AGENTS_FRONTEND_TRADE_LIMIT_STICKY_CTA.mdmatch the new primitive. RTL + Playwright assert bottom alignment (not only opacity / DOM order).make verify-issue-<iid>covers unit + geometry grep/E2E hooks.Test plan (all paths)
Unit / RTL (
make test-frontend/ scoped Vitest)TradePage.test.tsx#500 case — update selectors if the class name changes).trade-limit-submitis inside the footer wrapper; Market tab:trade-market-submitis inside the same footer wrapper (or documented equivalent testid).disabled+ guard text still above the footer.transparent/rgba(0,0,0,0)without a background-image underlay.Playwright (
e2e/trade-page-responsive.spec.ts, Chromium project)Use bounding boxes, not screenshots-only:
submit.bottom≈ticketCard.bottom(≤ 8px).submitdoes not intersect Pay % chips, Receive, or Expiry chips.trade-market-submitsame bottom alignment; no leftover Limit button visible mid-form.trade-sub-lg-ticket-col.position: fixedcovering the bottom nav.datetime-localscrollIntoViewelementFromPointon the input does not hit the footer.Firefox/WebKit: if the suite runs them, P1 + P6 must pass there too (docking must not be Chrome-only CSS).
Manual QA (Chrome)
make dev→/tradeon a live pair. Confirm Place limit sits on the bottom edge of the right-hand ticket, not mid-form.Test plan — attack, hack, and abuse vectors
This is layout chrome, not a new signing path. Still treat the overlay as a click / focus integrity bug.
elementFromPointon Expiry chips, % chips, price, and Pay amount hits those controls — nottrade-limit-submit. A mid-form overlay must not silently submit.disabled. Footer chrome must not use a visible “enabled” layer over a disabled button.useTerraBroadcastMutationpending/isPendingdisable. Do not add a second submit node that can fire in parallel.position: fixed/ portal footertrade-order-ticket-scroll’s sibling inside the card). A fixed node can cover other routes or the extension wallet prompt.PanelResizeHandlemust not be captured by the footer (pointer-eventson the footer must not extend outside the ticket).tabindex≥ 0 on decorative footer chrome.Error.messagevia existingTxResultAlert). Do notinnerHTMLindexer or wallet strings into the footer.Verification criteria
Issue is done when all of the following are true:
/trade(desktop + tablet): Place limit / Market CTA is flush with the ticket bottom; screenshot comparable to the report no longer shows a mid-form float.docs/frontend.mdsection andAGENTS_FRONTEND_TRADE_LIMIT_STICKY_CTA.mddescribe the footer primitive (not “stickybottom: 0” if that is gone).make verify-issue-<iid>exists and is green locally (unit + docs/testid greps; E2E invoked when the LocalTerra stack is up — do not skip with a false “no LocalTerra” withoutmake has-localterra/make setup-cloud-localterra).elementFromPoint+ disabled + modal z-index is enough; A9 is a grep / existing alert component).Mode
Severity
marked as related to #500
marked as related to #348
mentioned in commit
869951dacamentioned in issue #528
mentioned in issue #530
mentioned in merge request !1059
mentioned in merge request !1062
Merge sanity check for !1062 (before landing on main):
shrink-0ticket footer; noposition:fixed/portal; guards stay in flow; one ticket mount).useLayoutEffectpublishes submit chrome.trade-order-ticket-scroll; only Place/Update/Market CTA lives intrade-ticket-submit-footer.mentioned in commit
9ee15f75ecmentioned in commit
438e7bc00bmentioned in commit
9fd8b4eadfmentioned in issue #561
mentioned in issue #563
mentioned in issue #693