ux: /trade ticket heading + drop compact Connect Wallet; green Buy / red Sell side control #563
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#563
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
The
/tradeorder ticket heading (Buy {base} / Sell {base}) is truncated because it shares a row with a compact Connect Wallet chip. That chip is redundant: the shell header already has a primary Connect Wallet control, and the ticket footer already has a large money-CTA Connect Wallet when disconnected (#527). Separately, the Buy {base} / Sell {base} side control uses the sametab-glassblue wash as Limit/Market tabs, so the money direction does not stand out. Show the full heading, remove the compact header wallet chip, and style Buy green / Sell red on/tradeand/limitswithout changing escrow semantics.Current codebase
Heading + compact wallet chip
TradeOrderTicket.tsxheader:h3.trade-ticket-headingusestruncate:{verb} {displayBase}(e.g.Buy cLUNC) orSelect a pair.Connect wallet; connected showsaddr.slice(0,8)…slice(-6). Click callsopenWalletModal()only when disconnected. Connected click is a no-op.trade-ticket-pair-invert) sits in the same heading row (#524).Other connect affordances (keep these):
WalletButton.tsxbtn-primaryConnect WalletTradeTicketSubmitFooter.tsxTRADE_MONEY_CTA_CLASS)Side control
LimitOrderBidAskSideSelector.tsxis a WAI-ARIA radiogroup (#153). Labels fromtradeDirectionSideLabels.ts: Buy {base} / Sell {base} (#412, #489). Both buttons usetab-glass/tab-glass-active/tab-glass-inactive(blue active wash). Used on/trade(idPrefix="trade-ticket") and/limits(idPrefix="limit-orders").docs/design-system.mdcurrently lists--color-positive/--color-negativeas semantic chart / status (not button fills). Ticket Top buy / Top sell stats already color values with those tokens (TicketStattone).Why the new implementation is needed
Buy cLUNCrendering asBuy c…hides the asset the user is about to buy or sell. That is unsafe on a money screen.Constraints / guardrails
side === 'bid'still escrows token1;askescrows token0. Selector only togglesside. Parents still clear/re-apply amounts on side change (#155).role="radiogroup"/role="radio",aria-checked, roving tabindex, Arrow/Home/End. Do not revert to native<input type="radio">.aria-checked). Labels stay Buy {base} / Sell {base} — never color-only, never raw Bid/Ask on the place card (#489).btn-primaryPlace limit / Market) green or red. Limit vs Market tabs staytab-glass*blue.alert-error.:focus-visiblerings stay (AGENTS_FRONTEND_A11Y_FOCUS.md).Buy {displayBase}/Sell {displayBase}without CSStruncateat the default desktop ticket width. Long symbols wrap or shrink typography; they must not clip to…on hub tickers (cLUNC, cUSTC, UST1, USTR). Invert control stays adjacent and tappable./tradeand/limitsstay visually aligned. Compact vs full density (compactprop) both get semantic colors.Relevant files
frontend-dapp/src/components/trade/TradeOrderTicket.tsxfrontend-dapp/src/components/trade/LimitOrderBidAskSideSelector.tsxfrontend-dapp/src/components/trade/__tests__/LimitOrderBidAskSideSelector.test.tsxfrontend-dapp/src/utils/tradeDirectionSideLabels.tsfrontend-dapp/src/pages/LimitOrdersPage.tsxfrontend-dapp/src/pages/TradePage.test.tsxtrade-ticket-headinginvert casesfrontend-dapp/src/components/trade/TradeTicketSubmitFooter.tsxfrontend-dapp/src/components/wallet/WalletButton.tsxfrontend-dapp/src/index.cssfrontend-dapp/src/theme-dark.css/theme-light.cssdocs/design-system.mddocs/frontend.md§ Limit place — Bid / Ask side controlskills/AGENTS_FRONTEND_LIMIT_ORDER_SIDE_SELECTOR.mdtab-glass*skills/AGENTS_FRONTEND_DESIGN_SYSTEM.mdskills/AGENTS_FRONTEND_TRADE_TICKET_CTA_DOCK.mdRecommended direction
<button>andwalletLabelUI. LeaveopenWalletModalon footer / signed actions.min-w-0+ wrap (break-words/ two-line) instead oftruncate. Keep invert buttonshrink-0. RTL:trade-ticket-headingtext is the fullBuy cLUNC(and invertedBuy UST1) at a ~24% column width.side-buy/side-sellwith selected vs idle using--color-positive/--color-negative(or dedicated--side-buy*tokens). Idle = muted fill + colored border/text; selected = stronger fill + emphasis ring. Update skill rule 4 so side controls may deviate from generictab-glass-activewhile keeping focus-visible./limitssame classes.Acceptance criteria
Buy c….aria-checked+ emphasis)./limitsSingle (and any otherLimitOrderBidAskSideSelector) matches. Limit/Market tabs and Place/Market CTAs stay blue primary.make verify-issue-<iid>.Test plan — functional paths
Heading / wallet chrome
trade-ticket-headingisBuy {symbol}; no header chip; footer is Connect Wallet;openWalletModalfrom footer still fires.Buy cUSTC↔Buy UST1(existing TradePage invert tests) still pass; heading not truncated after invert.Side colors / behavior
aria-checked=trueon bid; ask false; heading verb Buy; bid button uses buy/positive styles./limitsplace card: same colors; ladder/single unrelated chrome unchanged.Regression
Test plan — attack, hack, and abuse vectors
sidemapping. Place a bid and an ask (or unit-assert the submit payload /factorySide): Buy still bid/token1 escrow, Sell still ask/token0. A green/red swap bug is a fund-direction bug.displayBasefrom indexer/factory must remain text content (noinnerHTML). Oversized / RTL / ZWJ symbols wrap; they must not paint over Sell or the footer CTA.alert-errorso users do not treat Sell as a blocking error. Selected Buy must not look like a success toast that implies a fill already happened.:focus-visible; keyboard users can still see which side is focused.data-themeflip must not leave white-on-white side buttons (unreadable → misclick)./tradecannot leave/limitson oldtab-glass-activeonly (inconsistent direction encoding).Verification criteria
Manual (dark + light, desktop ticket column ~320px): hub pair cLUNC/UST1 — heading Buy cLUNC fully visible, no compact Connect Wallet in the ticket header, footer Connect Wallet when disconnected, Buy green / Sell red with a clear selected state, invert updates heading,
/limitsmatches. Confirm Place limit still blue.marked as related to #561
mentioned in issue #561
mentioned in commit
a1f01f8696mentioned in merge request !1092
mentioned in merge request !1095
mentioned in commit
b231ad78f4Post-merge note (!1092 on main). T563 heading wrap, no compact ticket Connect Wallet, green Buy / red Sell is on
main(stacked on #561 workspace).Remaining:
make verify-issue-563.mentioned in issue #573
marked as related to #573
mentioned in issue #693