Skip to content

feat(viewer): chart window keeps its charts' zoom between opens, refresh gives the standard view - #435

Merged
daggerok merged 1 commit into
mainfrom
feat/charts-keep-view
Dec 3, 2026
Merged

daggerok merged 1 commit into
mainfrom
feat/charts-keep-view

Conversation

@daggerok

@daggerok daggerok commented Dec 3, 2026

Copy link
Copy Markdown
Owner

What

  • The last opened chart window stays drawn but hidden when closed (Zoom keep: visibility hidden, inert, same size), so the TradingView charts keep their zoom and position for the next open. Opening another symbol's window lets the old one go, so one set of frames stays alive. A page reload starts from the standard view
  • ↻ redraws the charts in TradingView's standard view: disabled_features: ['use_localstorage_for_settings'], otherwise the widget draws every new chart with the last zoom of any chart from its own storage, and ↻ could not go back
  • The theme of a closed window is read as is (it was "light" while closed, which redrew the charts on close)

Why

Owner 2026-12-03: "after it was opened and I changed charts views / possitoin etc.. and then I closed it... next time I open (if not pressed on ↻) the config for these charts should stay the same as it was before I closed last time"

Checks

  • bun test: 546 pass (new: Zoom.test.tsx, a kept window stays hidden with the same frame; the tv-chart test asks for the storage switch)
  • .claude/tools/etfs/tc/check.sh on the changed files: clean
  • Chrome on localhost:1237 with made-up positions (PG for a real chart): Daily zoomed to March - December, Esc, opened again: the same March - December; ↻: back to the standard January - December. Side by side with tv.js: the stored zoom of another chart showed up in a new one without the switch, never with it; timeScale.barSpacing and rightOffset overrides change nothing

@daggerok
daggerok merged commit afab6bf into main Dec 3, 2026
1 check passed
@daggerok
daggerok deleted the feat/charts-keep-view branch December 3, 2026 16:11
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