Skip to content

fix(viewer): preserve projection data fields when merging config.embedding overrides - #304

Merged
donghaoren merged 1 commit into
apple:mainfrom
utkarshpatwa393-sys:fix/default-charts-embedding-merge
Nov 16, 2026
Merged

donghaoren merged 1 commit into
apple:mainfrom
utkarshpatwa393-sys:fix/default-charts-embedding-merge

Conversation

@utkarshpatwa393-sys

Copy link
Copy Markdown
Contributor

Summary

  • Merge config.embedding.data onto the default projection data object instead of shallow-replacing spec.data in defaultCharts() (packages/viewer/src/charts/default_charts.ts).
  • Update DefaultChartsConfig["embedding"] so partial data overrides (e.g. { data: { category: "label" } }) are accepted without re-specifying x and y.
  • Guard config.embedding != null so a runtime null value does not crash when reading .data.
  • Add unit tests in packages/viewer/test/default_charts.test.ts.

Verification

  • npx prettier -c packages/viewer/src/charts/default_charts.ts packages/viewer/test/default_charts.test.ts: passed
  • npm --workspace packages/viewer test: 12 test files passed, 146/146 tests passed

@donghaoren
donghaoren enabled auto-merge (squash) November 16, 2026 19:55
@donghaoren
donghaoren merged commit 0d75b54 into apple:main Nov 16, 2026
8 checks passed
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