Skip to content

feat(trade): candle chart zoom, delayed selection, and fixed header layout#6228

Closed
Claude wants to merge 1 commit intofeature/trde_guidefrom
claude/sub-pr-6227
Closed

feat(trade): candle chart zoom, delayed selection, and fixed header layout#6228
Claude wants to merge 1 commit intofeature/trde_guidefrom
claude/sub-pr-6227

Conversation

@Claude
Copy link
Contributor

@Claude Claude AI commented Mar 17, 2026

Implements pinch-to-zoom for candle charts with center-anchored scaling (1x-3x range), delayed candle detail display on press, and fixed-height header layout with smooth state transitions.

Candle Zoom

  • Range: 1x (default/minimum) to 3x (maximum)
  • Behavior: Scales candle body width only; spacing remains constant
  • Gesture: Two-finger pinch with center-anchored zoom; single-finger actions blocked during pinch
  • Sensitivity: 0.15x multiplier for smooth control

Delayed Candle Selection

  • Delay: 120ms before showing candle detail on pointer down
  • Cancellation: Releases, moves, scrolls, or pinch gestures cancel the pending detail display
  • Display: Shows Open, High, Low, Close, Volume when triggered

Header Layout

  • Fixed height: 96dp maintained across all states
  • Default state: Title → Price + Icon (48dp) → Change %
  • Selection state: Title + Icon (20dp) → OHLCV row
  • Transition: Icon size animates 48dp ↔ 20dp without affecting container height; Price/Change hidden during selection
// Zoom scales only candle width, not spacing
val candleWidth = baseCandleWidth * zoomScale  // 6dp * [1-3]
val spacing = baseSpacing                       // 2dp constant

// Delayed selection with cancellation
val releasedBeforeDelay = withTimeoutOrNull(CANDLE_DETAIL_SHOW_DELAY_MS) {
    tryAwaitRelease()
}
if (releasedBeforeDelay != null) return@detectTapGestures

All existing behaviors preserved: loading/error/empty states, candle rendering, timeframe switching, fiat conversion.

@Claude
Copy link
Contributor Author

Claude AI commented Mar 17, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:+UseParallelGC -Xmx10g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@Claude Claude AI changed the title [WIP] Feature/trde guide feat(trade): candle chart zoom, delayed selection, and fixed header layout Mar 17, 2026
@Claude Claude AI requested a review from SeniorZhai March 17, 2026 06:23
@SeniorZhai SeniorZhai closed this Mar 17, 2026
@SeniorZhai SeniorZhai deleted the claude/sub-pr-6227 branch March 17, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants