Skip to content

fix(ui): hide candles under the tick trace, wrap the Detects empty state - #410

Merged
kirillDevPro merged 2 commits into
mainfrom
feat/trade-window-detects-polish
Sep 3, 2026
Merged

fix(ui): hide candles under the tick trace, wrap the Detects empty state#410
kirillDevPro merged 2 commits into
mainfrom
feat/trade-window-detects-polish

Conversation

@kirillDevPro

Copy link
Copy Markdown
Collaborator

What & why

Two follow-ups from the live review of the previous round:

  • trade-window: where the tick trace covers a span, the 1-minute candles underneath it are
    no longer drawn; candles stay only on the edges the ticks do not cover, and while ticks are
    still loading the whole window stays on candles. The bottom-left source caption moves up one
    design size — it is the line that says what the window is drawing.
  • detects: the empty-state sentence sat in a flex row, so GPUI gave it no wrap width and it
    was clipped on both sides in a ~290 px side dock. It is now a column with a definite-width,
    centred sentence box and wraps onto as many lines as the panel needs.

How to verify

cargo test --workspace and cargo fmt --all -- --check are green. On a live build: a
Binance USD-M trade window shows ticks with no candles under them once the fetch lands; the
Detects panel docked narrow shows the whole «Детектов пока нет…» sentence on several lines.

…the source caption

Where the tick trace covered a span, the 1-minute candles were still
painted underneath it, so entry and exit read as two layers on top of
each other. The replay series now carries the span the tick walk
actually covered, and the window withholds every bar lying wholly
inside it; a bar straddling either edge stays, so the edges the
caption promises are still closed by candles. The span comes from
the walk itself rather than from the tick rows' extrema, because a
covered minute in which the venue published no trade would otherwise
show a candle in the middle of the trace.

The bottom-left source caption moves from the caption size to the
body size: it is the one line that says what the window is drawing
and was the smallest text on screen.
… a narrow dock

The Detects panel's empty-state sentence sat in a centred flex row.
GPUI derives a text element's wrap width only from a definite width,
so the layout probe measured the whole one-line string as the item's
minimum: it could not shrink, overflowed a ~290 px side dock
symmetrically and was clipped on both sides, leaving a fragment like
«а нет — карточка появится, когда ср» on screen.

The element is now a column whose sentence box carries a definite
full width with a horizontal inset and centred text, so the sentence
wraps onto as many lines as the panel needs and stays one line where
the panel is wide. All three empty-state sentences share the site.
A static contract pins the shape.
@kirillDevPro
kirillDevPro merged commit 002f4e6 into main Sep 3, 2026
6 checks passed
@kirillDevPro
kirillDevPro deleted the feat/trade-window-detects-polish branch September 3, 2026 22:04
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.

1 participant