Skip to content

feat(predict): Refine Bottom Sheet small UI Tweaks#30979

Merged
MarioAslau merged 2 commits into
mainfrom
predict/bottom-sheet-tweaks
Jun 3, 2026
Merged

feat(predict): Refine Bottom Sheet small UI Tweaks#30979
MarioAslau merged 2 commits into
mainfrom
predict/bottom-sheet-tweaks

Conversation

@MarioAslau

@MarioAslau MarioAslau commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Description

Small set of UI polish tweaks to the Predict buy bottom sheet (sheet mode of PredictBuyWithAnyToken), based on design feedback on spacing and alignment.

What changed and why:

  1. Header icon / close button alignment — the header used px-6 py-4, so the market icon (left) and the close X (right) were inset 24px while the content/pills below are inset 16px, making them look misaligned. Changed the header to px-4 py-4 so the icon's left padding equals its top padding and both the icon and X line up with the pills and rows beneath them.
  2. Amount input caret — the blinking caret was sized off the text line-height (lineHeight - 4, ~66px for $0), making it taller than the digits and sitting a little far from the number. It now matches the glyph cap height (fontSize * 0.72) and sits closer (px-1 on the value text, ml-0 on the caret).
  3. Quick-amount pills — reduced vertical footprint: row padding py-2 -> py-1, and pill height h-12 -> h-11 (44px, kept at the iOS minimum touch target). The pills remain edge-aligned with the pay-with/total rows via the shared px-4 inset.
  4. Error banner spacing — the in-sheet error banner had uneven spacing (24px above from PredictFeeSummary's pb-6, 20px below from its own mb-5). Added -mt-1 so the top gap becomes 20px and matches the bottom gap, with a comment documenting the intent so it isn't a "magic" offset.

These are presentational (Tailwind class) changes only — no logic, data flow, or control flow was modified.

Files changed:

  • app/components/UI/Predict/components/PredictPreviewSheet/PredictPreviewSheet.tsx
  • app/components/UI/Predict/components/PredictAmountDisplay/PredictAmountDisplay.tsx
  • app/components/UI/Predict/views/PredictBuyWithAnyToken/components/PredictQuickAmounts/PredictQuickAmounts.tsx
  • app/components/UI/Predict/views/PredictBuyWithAnyToken/components/PredictBuyErrorBanner/PredictBuyErrorBanner.tsx

(4 files changed, 12 insertions(+), 6 deletions(-))

Note on shared components: PredictPreviewSheet is also used by the Predict sell sheet, and PredictAmountDisplay is also used by the legacy/fullscreen buy preview — so the header padding and caret tweaks apply consistently to those surfaces too.

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Feature: Predict buy bottom sheet polish

  Scenario: Header icon and close button are aligned with the content
    Given I am on a Predict market details screen
    When I tap an outcome to open the buy bottom sheet
    Then the market icon's left padding visually matches its top padding
    And the icon's left edge and the close (X) button's right edge line up with the quick-amount pills and the rows below

  Scenario: Amount caret matches the typography
    Given the buy bottom sheet is open with the keypad active
    When I look at the "$0" / amount value
    Then the blinking caret is about the height of the digits (not taller)
    And the caret sits close to the number

  Scenario: Quick-amount pills are compact and tappable
    Given the buy bottom sheet is open
    Then the $20 / $50 / $100 / $250 pills have a tighter vertical padding
    And each pill is still at least 44px tall and easy to tap
    And the pill row is edge-aligned with the "Pay with" and "Total" rows

  Scenario: Error banner is evenly spaced
    Given the buy bottom sheet is open and an order error banner is shown
    Then the spacing above the banner (from the Total row) equals the spacing below it (to the action button)

Screenshots/Recordings

Before

After

Screenshot 2026-06-03 at 01 59 34

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Validation run locally

  • yarn lint (eslint): 0 errors (2 pre-existing deprecation warnings on unchanged lines).
  • yarn lint:tsc (tsc --noEmit): passes, 0 type errors.
  • Unit tests: 4 suites / 49 tests pass (PredictAmountDisplay, PredictPreviewSheet, PredictBuyErrorBanner, PredictQuickAmounts).

Note

Low Risk
Presentational Tailwind/class tweaks only; no auth, data, or business-logic changes.

Overview
Polishes Predict buy/sell preview bottom sheet layout so header, amount entry, quick amounts, and error states line up with design spacing.

PredictPreviewSheet header horizontal padding goes from px-6 to px-4 so the market icon and close control align with the 16px-inset content below (also affects sell sheet and other consumers of this shared header).

PredictAmountDisplay tightens amount typography spacing (px-2px-1) and resizes the blinking caret from line-height-based height to fontSize * 0.72, with ml-0 so the caret matches digit cap height and sits closer to the value (shared with fullscreen buy preview).

PredictQuickAmounts reduces vertical padding (py-2py-1) and pill height (h-12h-11, still ≥44px touch target).

PredictBuyErrorBanner adds -mt-1 (documented) to balance 20px gaps above/below the banner relative to PredictFeeSummary’s pb-6.

All changes are Tailwind/class-only; no logic or data flow changes.

Reviewed by Cursor Bugbot for commit 9849b1b. Bugbot is set up for automated code reviews on this repo. Configure here.

@MarioAslau MarioAslau self-assigned this Jun 3, 2026
@MarioAslau MarioAslau added the team-predict Predict team label Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@MarioAslau MarioAslau marked this pull request as ready for review June 3, 2026 01:09
@MarioAslau MarioAslau requested a review from a team as a code owner June 3, 2026 01:09
@github-actions github-actions Bot added the size-S label Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePredictions, SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 95%
click to see 🤖 AI reasoning details

E2E Test Selection:
All 4 changed files are purely UI/styling adjustments within the Predict (Polymarket) feature:

  1. PredictAmountDisplay.tsx: Cursor height calculation improvement (72% of font size), padding px-2→px-1, cursor margin ml-0.5→ml-0 - cosmetic typography fixes.
  2. PredictPreviewSheet.tsx: Bottom sheet header padding px-6→px-4 - minor spacing adjustment.
  3. PredictBuyErrorBanner.tsx: Added -mt-1 margin to fix spacing between PredictFeeSummary and error banner - layout fix.
  4. PredictQuickAmounts.tsx: Vertical padding py-2→py-1, button height h-12→h-11 - minor size adjustments.

No logic changes, no controller changes, no shared component changes, no API changes. Risk is low.

Tag selection:

  • SmokePredictions: Directly covers the Polymarket prediction market flows including the buy flow, preview sheet, amount display, and quick amounts components that were all modified.
  • SmokeWalletPlatform: Required per SmokePredictions description - "Predictions is also a section inside the Trending tab (SmokeWalletPlatform); changes to Predictions views affect Trending."
  • SmokeConfirmations: Required per SmokePredictions description - "opening/closing positions are on-chain transactions - when selecting SmokePredictions, also select SmokeConfirmations."

Performance Test Selection:
All changes are purely cosmetic/layout adjustments (padding, margins, cursor height, button height). No data loading, state management, rendering performance, or app initialization changes. Performance tests are not warranted.

View GitHub Actions results

@github-actions github-actions Bot added the risk:low AI analysis: low risk label Jun 3, 2026
@MarioAslau MarioAslau added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit a606670 Jun 3, 2026
207 checks passed
@MarioAslau MarioAslau deleted the predict/bottom-sheet-tweaks branch June 3, 2026 17:15
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

risk:low AI analysis: low risk size-S team-predict Predict team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants