Skip to content

feat: Tradingview Lightweight Charts - #1402

Draft
jnumainville wants to merge 37 commits into
deephaven:mainfrom
jnumainville:jnumainville_tvl
Draft

feat: Tradingview Lightweight Charts#1402
jnumainville wants to merge 37 commits into
deephaven:mainfrom
jnumainville:jnumainville_tvl

Conversation

@jnumainville

Copy link
Copy Markdown
Collaborator

WIP

dsmmcken and others added 30 commits April 11, 2026 10:56
Co-authored-by: Copilot <copilot@github.com>
# Conflicts:
#	package-lock.json
#	package.json
#	tests/app.d/tests.app
# Conflicts:
#	package-lock.json
#	tests/app.d/tests.app
*_series constructors and chart-level kwargs on per-type constructors
were removed; compose via tvl.chart(...) instead. Fixes server startup
crash in e2e docker container.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…s them

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fix pre-existing lint errors that fail `npm run test:ci` (test:ci:lint):
- Move @deephaven/dashboard-core-plugins from devDependencies to
  dependencies (imported by non-test source; import/no-extraneous-deps)
- strict-boolean-expressions: explicit null/empty checks
- no-shadow: rename shadowing pendingDs locals to pendingResample
- no-param-reassign: house-style inline disables for intentional mutation
- no-nested-ternary: hoist chart-type formatter selection to if/else
- drop unused error/isLoading state value bindings
- normalize isDownsampleSwap to a definite boolean
- consistent-type-imports, no-empty-function, react/destructuring-assignment,
  jsx-props-no-spreading, max-classes-per-file, and prettier formatting

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove 6 of the 7 eslint-disable comments added when first fixing lint,
addressing the root causes instead:
- no-explicit-any: pendingDownsample is a public field; drop the `as any`
- no-param-reassign (x2): mutate via array-index locals, not forEach params
- jsx-props-no-spreading (x2): destructure and pass props explicitly in tests
- max-classes-per-file: make MockResizeObserver a mock factory (one class left)

The one remaining disable (react-hooks/exhaustive-deps on the DOM-derived
useDHChartTheme memo) is kept intentionally — it matches the established
convention in the ui plugin for memos that depend on non-scope DOM state.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The tvl plugin lagged the rest of the repo (e.g. dashboard-core-plugins
^0.85.42, components ^1.2.0, plugin ^1.2.0). Bump the shared @deephaven/*
deps to the versions the sibling plugins (pivot / pivot-builder / plotly-
express) pin, which are already hoisted at the workspace root:

- components ^1.22.1, dashboard ^1.24.0, dashboard-core-plugins ^1.24.0,
  jsapi-bootstrap ^1.23.0, log ^1.8.0, plugin ^1.24.0, redux ^1.23.0,
  utils ^1.10.0, jsapi-types ^1.0.0-dev0.39.6

This dedupes the previously-nested dashboard-core-plugins@0.85.x tree onto
the root 1.24.0 install (removing ~167 stale packages). Verified: repo-wide
tsc, full build, and test:ci (unit + lint) all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cut the tradingview-lightweight plugin's eslint-disable comments from 72 to
4 by fixing the underlying issues instead of suppressing them:

Production source:
- no-explicit-any (33): use real @deephaven/jsapi-types / lightweight-charts
  types (Widget.sendMessage, PartitionedTable, plot.Downsample, DateWrapper,
  Event<T>, IRange/LogicalRange), access now-public model fields directly,
  and add a declaration.d.ts for the `*.css?inline` import (drops @ts-ignore)
- no-param-reassign (2): resolve colors into locals, not the params
- no-continue (3): wrap loop bodies in positive conditions
- no-non-null-assertion (1): get-or-create map entry
- class-methods-use-this (1): make unwrapValue static
- import/prefer-default-export (1): default-export the plugin

Tests:
- no-new (16): assign construction to a var + assert defined (house pattern)
- no-underscore-dangle (9) + no-var-requires (1): expose mock internals under
  non-underscore names, import the same mock instance via `import * as`
- no-explicit-any (2): `as never` / typed casts

The 4 remaining are deliberate and match repo convention: react-hooks/
exhaustive-deps on two DOM-derived effects/memos (as the ui plugin does), and
no-underscore-dangle on the intentional `__tvlTestHook` global debug hook.

Verified: repo-wide tsc, build, and test:ci (unit + lint, 332 suites) all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

plotly-express docs preview (Available for 14 days)

@github-actions

Copy link
Copy Markdown

ui docs preview (Available for 14 days)

@github-actions

Copy link
Copy Markdown

plotly-express docs preview (Available for 14 days)

@github-actions

Copy link
Copy Markdown

ui docs preview (Available for 14 days)

@github-actions

Copy link
Copy Markdown

ui docs preview (Available for 14 days)

@github-actions

Copy link
Copy Markdown

plotly-express docs preview (Available for 14 days)

@github-actions

Copy link
Copy Markdown

ui docs preview (Available for 14 days)

@github-actions

Copy link
Copy Markdown

plotly-express docs preview (Available for 14 days)

@github-actions

Copy link
Copy Markdown

ui docs preview (Available for 14 days)

@github-actions

Copy link
Copy Markdown

plotly-express docs preview (Available for 14 days)

@github-actions

Copy link
Copy Markdown

ui docs preview (Available for 14 days)

@github-actions

Copy link
Copy Markdown

plotly-express docs preview (Available for 14 days)

@github-actions

Copy link
Copy Markdown

tradingview-lightweight docs preview (Available for 14 days)

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