Skip to content

feat(vega): theme Vega-Lite charts by default, with the charts package's palette - #4411

Draft
AKnassa wants to merge 24 commits into
meta:mainfrom
AKnassa:ak-977-vega-charts-theming
Draft

AKnassa wants to merge 24 commits into
meta:mainfrom
AKnassa:ak-977-vega-charts-theming

Conversation

@AKnassa

@AKnassa AKnassa commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer reshape (old pull request)

This pull request is carried forward by a maintainer under maintainer edits, keeping AKnassa's commits and authorship. Current main is merged in (no rebase). The reshape keeps the API delta to what component:VegaChart records:

  • @astryxdesign/charts does not export CATEGORICAL_TOKENS. The Vega categorical range comes from getChartColorsFromResolver(token).categorical(10), the compositional charts' palette; ten slots is the range Vega used before.
  • withAstryxConfig stays internal. VegaChart applies it, and @astryxdesign/vega does not export it.
  • The @astryxdesign/core peer follows main's version, as @astryxdesign/charts already does.
  • A new component:VegaChart record (docs/specs/components/VegaChart/VegaChart.spec.md) states the themed-by-default order in one FR: Astryx theme config as the base, the caller's compileOptions.config on top, the spec's own inline config last; a native Vega spec passes through untouched. Its Public concepts table names the props as built.

What this does

Vega-Lite charts now pick up the Astryx theme out of the box, sharing one palette with @astryxdesign/charts instead of keeping a private copy. A native Vega spec is unchanged.

What changed

  • VegaChart compiles a Vega-Lite spec with the Astryx theme config from buildVegaLiteConfig as its base, read from the active <Theme> (component:VegaChart FR1). Before this, VegaChart never applied that config, so a chart rendered with Vega's defaults.
  • The categorical range comes from the @astryxdesign/charts palette through getChartColorsFromResolver(token).categorical(10), so a series colored blue in a <Chart> is the same blue here. Before this, vega kept its own copy of the ten categorical tokens.
  • @astryxdesign/charts and @astryxdesign/core are peer dependencies of @astryxdesign/vega, so an app shares one copy of each. manifest.test.ts checks that every @astryxdesign/* package the wrapper imports is a peer.
  • A native Vega spec is not themed: it skips Vega-Lite compilation. Pass parseConfig for those.
  • A chart with no spec still renders an empty container and reports through onError.

Precedence

Weakest first: the Astryx theme config, then compileOptions.config, then the spec's own inline config. Merging is recursive, so a partial override such as {axis: {grid: true}} replaces only that key. The theme also sets per-axis blocks (axisX, axisY, axisXQuantitative, axisYQuantitative). Vega-Lite resolves axis, then the orient blocks, then axisX and axisY, then the type blocks such as axisQuantitative, then the channel-and-type blocks. For each key that the caller or the spec sets in an axis block resolved earlier for the same axes, the theme's per-axis value for that key is left out, so the caller's or the spec's value wins: {axis: {grid: true}} adds the x grid, and {axisY: {grid: false}} removes the y grid. One exception: a named style entry (such as style['guide-label']) does not outrank the theme's axis, legend and title text (see Known limits).

Callers that pass a partial config

A chart that passes only part of a config (for example the Lab/ChartTheming/Vega story) gets the theme for every key it leaves out. The theme sets title: null on axes and legends, so titles derived from field names do not render under it; a caller brings titles back with a title in the encoding, or with title: undefined for that axis or legend in its config (a title string in the config renders no axis title).

No changeset

@astryxdesign/vega is private: true (0.1.3) and is not in the release group in .changeset/config.json, so it has no stable release, and scripts/check-changesets.mjs rejects a changeset that names a private package. It does ship to @canary: the canary job publishes canary-only packages from main's tip, so canary users get the themed default and the two new peers at the next canary after this merges. This pull request changes no package in the release group (the charts files are back to main), so it has no changeset. The change reaches stable users when vega is published, through that release's own changeset.

Scope

The lab interaction layers (ChartBrush, ChartZoom, ChartSelect, useChartRange) are not part of this change.

Writing rubric results

Record added: component:VegaChart (FR1, the Public concepts table, and its verification row).

  • R1 narration: none. FR1 and the compatibility lines state the behavior in the present tense.
  • R2 research: none.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives: none.
  • R5 pull request or issue references: none.
  • R6 open questions: none.
  • R7 project status: none.

Testing

Under fork rules the vega tests run in CI: VegaChart.test.tsx (the compile path with the theme underneath compileOptions, a missing spec, the rebuild policy across a color-mode change), vegaLiteConfig.test.ts (the config, the palette from the theme resolver, and the theme, caller and spec precedence compiled through real Vega-Lite), and manifest.test.ts.

Refs #977

Known limits

  • Named Vega styles: the theme's axis, legend and title text blocks take precedence over a caller's or a spec's named style entries (guide-label, guide-title, group-title, group-subtitle, and styles named from the caller's axis config). The caller-on-top order holds for config keys such as axis, axisX, legend, title, mark and point; this gap is recorded in component:VegaChart's verification map.

Owner and land path

  • Owner: a fix-loop lane, an agent working for @cixzhang on Astryx maintenance.
  • Land path: themed-by-default charts are decided (the owner approved component:VegaChart). It merges through CI once review and the owner approval are in. A carry commit updates .github/scripts/typecheck-scope.test.mjs (a Charts change now also typechecks vega, which peers on charts).
  • Carries at eeeaab2, 19b5619 and the head (credited to @AKnassa): the theme's per-axis values now follow the axes Vega-Lite places itself. A layer's second independent axis, which Vega-Lite moves to the opposite side, and an orient set in the axisX, axisY or axis config count as drawn there, so a caller's orient block (for example axisTop) keeps its rank over the theme on that axis, as component:VegaChart FR1 states. The theme's line and point values also step aside for a caller's or a spec's mark keys, its band padding is set per mark so a caller's per-mark keys apply, and axes a layer's views inherit or a repeat of layers draws count too. The theme's point fill, which paints a hollow point's center, steps aside when the chart may draw a filled point (a filled point mark, a line, area or trail mark's point dots, a point setting in a line, area or trail config, or a shape encoding) or the caller or the spec sets filled, color or fill on mark or point, so filled points keep their color. This changes which axis a theme value lands on for those charts. The owner's approval of component:VegaChart was given at an earlier head; whether it covers this change is for the spec owner to confirm.

`@astryxdesign/vega` declared no `@astryxdesign/*` dependency at all: it
re-declared its own `TokenResolver`, hand-copied charts' 10-entry categorical
token list, and `VegaChart` never applied `buildVegaLiteConfig` — so a Vega
chart rendered unthemed out of the box. This is the "wire @astryxdesign/vega
to depend on it for shared theming" half of the issue's stated remaining work.

`CATEGORICAL_TOKENS` is now exported from charts as the single source of
truth and consumed by vega, so the two lists cannot drift. `VegaChart`
compiles through the new pure `withAstryxConfig()`, which layers the theme
underneath the caller's config: theme is the base, `compileOptions.config`
overrides it, and a spec's own inline `config` still wins over both (that
last rule is vega-lite's, not ours). Merging uses vega's recursive
`mergeConfig`, so a partial override no longer wipes the themed block.

Test infrastructure had to move with it: the vitest `node` project resolves
workspace packages through their `exports` map — dist, not src — and CI's
test job runs with no build step, so every vega suite died at import.
`ensureCoreBuilt` is the established precedent for exactly this, so it is
generalized to `ensureBuilt(pkg, artifact, slug)` with its own signature
preserved, and the global setup now also ensures charts.

No changeset: both packages are `private: true`, and `check:changesets`
rejects private packages outright, so any changeset here fails `pnpm lint`.

Refs meta#977
@vercel

vercel Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Dec 3, 2026 4:22pm UTC

Request Review

@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge labels Jul 26, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 26, 2026
@github-actions

github-actions Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

Conflict: vitest.global-setup.node.mjs — upstream moved the shared build
helper to packages/cli/clients/cli/commands/ in the CLI restructure; kept
this branch's ensureChartsBuilt import at the new path.

Also re-pinned vega's @astryxdesign/charts dependency (0.1.8 -> 0.1.9) and
@astryxdesign/core peer (0.1.8 -> 0.3.0) to the current workspace versions
so pnpm keeps linking the workspace packages, per the charts->core exact-pin
convention.
@AKnassa
AKnassa marked this pull request as ready for review August 7, 2026 03:08
github-actions Bot added a commit that referenced this pull request Aug 7, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for wiring Vega to the shared charts palette — the shared token list and recursive config merge are a clean way to theme Vega-Lite by default.

Two fixes are needed before this can land:

  • Keep theme changes from recreating native Vega views. The themed compile options currently participate in the view lifecycle for every spec, so a theme toggle finalises a native view even though native specs do not use that config, discarding live state. Please gate that reactivity to Vega-Lite and add a test that a native view survives a theme change.
  • Align the new @astryxdesign/core peer in the Vega package with the version charts requires, so both peers can be satisfied by one core installation.

Please also add representative light/dark rendered evidence for the default theming and override precedence, plus a native chart control, so the visible change can be checked directly.

[Automated review]

Resolved conflicts:
- packages/vega/src/VegaChart.tsx: kept upstream's value-compared View
  latch (meta#6051) and fed the PR's themed compile options into it as
  `compileOptions`, replacing the PR's effect dependency list.
- packages/vega/README.md: merged the file manifest (upstream's
  viewInputs.ts row plus the PR's tsconfig.build.json and
  vegaLiteConfig.ts rows).
- packages/vega/src/vegaLiteConfig.test.ts (add/add): kept upstream's
  suite and added the PR's shared-palette and withAstryxConfig tests.
- vitest.global-setup.node.mjs: took upstream's version. Vega tests now
  run in the `ui` project (meta#4377), so the node global setup no longer
  needs to build charts.

Merge fallout:
- packages/cli/clients/cli/commands/ensure-core-built.mjs: took
  upstream's version, dropping the PR's ensureBuilt/ensureChartsBuilt
  generalization, which nothing uses any more.
- vitest.config.ts: resolve the bare @astryxdesign/charts specifier to
  source, as core already is, so the `ui` project does not need a built
  charts dist.
- packages/vega/src/VegaChart.test.tsx: the vega mock now keeps the real
  module (vegaLiteConfig needs mergeConfig), and the compileOptions test
  expects the caller's config merged over the default theme config.
- packages/vega/src/VegaChart.doc.mjs: compileOptions notes that its
  config is merged over the Astryx theme config.
astracat F1: the themed compile options took part in the View lifecycle
for every spec, so a theme or color-mode switch finalized and rebuilt a
native Vega View (losing zoom, hover, and signal state) even though
native specs never compile and never read that config.

VegaChart now applies withAstryxConfig only when the spec's $schema is
Vega-Lite, and feeds those options into the value-compared View latch
(meta#6051). Native specs keep the caller's compileOptions untouched, so a
theme switch no longer changes their inputs. `token` from useTheme is
used directly: it keeps its identity until the resolved theme changes,
so the old comment about a fresh closure every render was wrong.

The README's View lifecycle section and the component docblock now say
that a theme or mode change rebuilds a Vega-Lite View and never a native
one.

Proof: new VegaChart.test.tsx "theme changes" tests. "keeps a native
Vega View when the color mode changes" failed before the gate
("expected [ FakeView, FakeView ] to have a length of 1 but got 2") and
passes after it. "rebuilds a Vega-Lite View with the new mode's theme
config" checks that a light->dark switch rebuilds once and compiles with
the dark theme config.
astracat F2: the vega package pinned its @astryxdesign/core peer at
0.3.0 while charts (its direct dependency), lab, and core itself are at
0.6.3, so the two peers could not be met by one core install. The pin
now matches charts' exact 0.6.3, and the vega importer in pnpm-lock.yaml
carries the new specifier (only that hunk changed).

Proof: a node check comparing vega's core peer with charts' peer and
core's version exited 1 before (0.3.0 vs 0.6.3) and exits 0 after.
`pnpm install --frozen-lockfile` is up to date. No changeset: the
package is private.
F1 follow-up (verifier, repair round 1): the themed compile options were
memoized on the caller's compileOptions identity. withAstryxConfig merges
the caller's config into a new object, so mutating compileOptions.config in
place and re-rendering handed the meta#6051 latch the stale merge, and the
Vega-Lite View never rebuilt. That broke the README's View lifecycle promise
that these props are compared by value and need no useMemo.

- VegaChart.tsx: compute the gated options on every render
  (`isVegaLite ? withAstryxConfig(token, compileOptions) : compileOptions`)
  and drop the useMemo. The latch already compares by value, so equal
  inline options still keep the View, and native specs still get the
  caller's object untouched, so a theme change still never rebuilds them.
- VegaChart.test.tsx: 'rebuilds a Vega-Lite View when compileOptions.config
  is mutated in place' failed first ("expected [FakeView] to have a length
  of 2 but got 1") and passes now. 'keeps a Vega-Lite View when a re-render
  passes equal inline compileOptions' guards the unmemoized merge against
  rebuilding on every render.

Hooks skipped: lint-staged backs up through the git stash shared with other
worktrees. eslint, prettier, check-sync, check-knowledge,
check-package-boundaries, check-changesets and check-use-client were run
by hand and pass.
@AKnassa

AKnassa commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Pushed through 88c1dcf.

Merged main in. The PR now uses #6051's value-compared View latch, and vega tests run in the ui project (#4377). So I dropped this PR's ensureBuilt/node global-setup changes and added an @astryxdesign/charts source alias in vitest.config.ts.

  • Native views on theme change: the themed compile options are now applied only when the spec's $schema is Vega-Lite, and they go through the fix: repair runtime and tooling audit regressions #6051 latch. Native specs get the caller's compileOptions untouched, so a theme or color-mode switch no longer rebuilds them. New tests check that a native View survives a light/dark switch and that a Vega-Lite View rebuilds with the dark config. A Vega-Lite chart still rebuilds on a theme change, because the config is applied when the spec is compiled. The README's View lifecycle section says so now. (74f380c)
  • Follow-up to the point above: the themed options are now merged on every render instead of memoized on the caller's object, so editing compileOptions.config in place still rebuilds a Vega-Lite View. Equal inline options still keep the View. (88c1dcf)
  • Core peer: @astryxdesign/core is now 0.6.3, the exact version charts pins, and the vega importer in the lockfile is updated to match. (73b4e15)

Still to do: light/dark screenshots in the PR body showing the default theme, a compileOptions.config override winning, and the native Radial Plot story as an unchanged control.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for wiring Vega to the shared charts palette, and for fixing the two issues from the last round — native Vega views now survive a theme or color-mode switch (with regression tests), and the core peer now matches the version charts requires.

Approval needs a maintainer decision first. This change adds a new direction — Vega depending on charts as the single source of the categorical palette, and Vega-Lite charts being themed by default with the caller's config and a spec's inline config overriding the theme — and no current governing spec settles that addition yet; the charts component spec is still a draft and the tracked issue points to a wiki write-up. A maintainer needs to provide or identify the governing spec for the dependency and palette ownership, and for the default-theming precedence with native Vega left unthemed.

Two things are also still outstanding, independent of that decision:

  • Installing Vega through the repo's consumer-install path currently fails: the pinned @astryxdesign/charts 0.1.9 dependency has no published version to resolve (charts ships only as canary builds), and the registry-contract check fails on it at this revision. Declaring charts the way the core peer is declared, or with a spec the canary release actually publishes, would fix the consumer install.
  • The light/dark screenshots you flagged as still to do — default theme, a compileOptions.config override winning, and the native chart as an unchanged control — are still needed to check the visible change directly.

[Automated review]

The registry-contract check failed with
ERR_PNPM_NO_MATCHING_VERSION for @astryxdesign/charts@0.1.9 "while
installing the dependencies of @astryxdesign/vega@0.1.3". The ShadCN
registry builds a package-backed item's install list by walking peers
only, so charts never reached the consumer as a local file: package and
pnpm resolved vega's direct dependency from npm, where canary-only
charts has no 0.1.9.

- Move @astryxdesign/charts from dependencies to peerDependencies with
  the same exact spec as the core peer (sync-internal-deps and the
  canary stamp manage it the same way). pnpm-lock.yaml is unchanged:
  the importer already lists the auto-installed peer as link:../charts
  (frozen install and --lockfile-only both report up to date).
- README: install charts and core from the same @canary tag, since a
  canary pins both peers to its own build.
- manifest.test.ts: every Astryx package vega imports is a peer and
  none is a direct dependency. Red before the move (charts missing from
  peers, present in dependencies), green after.

Proof: rebuilt the VegaChart registry item from the workspace manifests
with buildShadcnRegistry (canary target) and ran `pnpm add` of its
file:-rewritten closure in a scratch consumer, as verify-full-catalog
does. Before: the closure lacked charts and pnpm failed with the CI
error. After: the closure includes charts, the install succeeds, and
vega's charts peer links to the consumer's single charts copy.
@AKnassa

AKnassa commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

Pushed 89b933b for the consumer-install failure. @astryxdesign/charts is now a peer dependency, declared like the core peer. The registry builds an item's install list from peers only, so the pinned direct 0.1.9 dependency was resolved from npm, where charts only has canary builds. With the peer, the same install resolves, and vega shares the app's single copy of charts. The README install line now pulls charts and core from the same @canary tag. A new manifest test checks that every Astryx package vega imports is a peer.

The governing-spec question and the light/dark screenshots are still open, as noted above.

…arts

Co-authored-by: AKnassa <AKnassa@users.noreply.github.com>
@cixzhang

cixzhang commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

🤖 (Posted by Cindy's agent.) One more small addition, @AKnassa: a repository CI test listed which packages a Charts change typechecks. Since vega now depends on charts through this pull request, we added 'vega' to that list in one small commit on your branch, crediting you as co-author. Your own code is unchanged, and nothing is needed from you. Thanks!

@cixzhang

cixzhang commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 9fecbb4

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the code follows the component:VegaChart record approved for this head, apart from one precedence case on axes whose side Vega-Lite picks itself.

  • An orient-block override loses to the theme on an axis whose orient Vega-Lite chooses: drawnAxes (packages/vega/src/vegaLiteConfig.ts:224-260) reads an axis's side only from the encoding, so on a dual-axis layer (where Vega-Lite moves the second axis to the top or right) or with an orient set in config, compileOptions={{config: {axisTop: {domain: false}}}} still draws the top domain line and {axisLeft: {domain: true}} also strips the theme from the right axis, contrary to the record's FR1 and the description's Precedence and partial-config sections; count Vega-Lite's own placement there and add real-compile tests for those cases.

Non-blocking:

  • Six comment-style suggestions from earlier rounds remain open, each with a shorter rewrite on its thread.
  • The CompileOptions.config doc comment still says it merges over the spec's own config (packages/vega/src/types.ts:39), which the README row this pull request corrected no longer says.

Reproduced locally with real Vega-Lite and Vega; the 88 vega tests pass locally, and CI's build and test jobs are deferred until review passes.

Claims and files checked

Review mode: same-head; reason: none

  • Title (live), "feat(vega): theme Vega-Lite charts by default, with the charts package's palette": verified (VegaChart.tsx:121-127, vegaLiteConfig.ts:130).
  • Carried forward by a maintainer, keeping the original author's commits, with main merged in and no rebase: verified (branch history).
  • Charts does not export its categorical token list: verified (getChartColors.ts:80 is module-local; charts is unchanged here).
  • The categorical range comes from the charts palette resolver with ten slots, as before: verified (vegaLiteConfig.ts:130; the same ten tokens in the same order).
  • The config-merge helper stays internal and the component applies it: verified (packages/vega/src/index.ts is unchanged).
  • The core peer follows main's version, as charts' does: verified (0.7.18 in both and on main).
  • The new record states the order in one requirement and its concepts table names the props as built: verified (FR1; the table matches VegaChartProps).
  • Vega-Lite charts pick up the theme out of the box, share one palette with charts, and native Vega is unchanged: verified (tests run locally).
  • The theme config comes from the active theme, where the base applied none: verified (the base compiled with the caller's options only).
  • A series blue in a compositional chart is the same blue here, and vega kept its own token copy before: verified.
  • Charts and core are peers, and a manifest test checks every imported Astryx package is one: verified (the wrapper's non-test sources import only those two).
  • Native Vega specs are not themed and take parseConfig: verified.
  • A chart with no spec renders an empty container and reports through onError: verified (missing-spec test, run locally).
  • Precedence is theme, then caller config, then the spec's config, merged recursively: verified for axes whose side the encoding states; false on axes Vega-Lite places itself (finding).
  • The theme sets four per-axis blocks, and Vega-Lite resolves the axis blocks in the order given: verified.
  • A caller or spec key in an earlier axis block leaves out the theme's per-axis value: false on axes Vega-Lite places itself (finding); the two examples given hold.
  • A partial config gets the theme for every key it leaves out, and field-derived titles are hidden: false for the right axis of a dual-axis chart under a left-axis key (finding); titles verified (vegaLiteConfig.ts:77, :107).
  • No changeset: vega is private and outside the release group, the changeset check rejects private packages, no release-group package changes, and canary users get the change with both peers stamped to the canary build: verified (changeset config, changeset check, release workflow canary step).
  • The lab interaction layers are out of scope: verified (no Lab files change).
  • Writing rubric results for the new record: verified.
  • The vega tests run in CI and cover the listed cases: reported (CI's test job is deferred until review passes); the listed cases exist and pass locally.
  • Owner line: reported. Land path: the record's approval is recorded for this head: verified. A carry commit updates the typecheck-scope test because a Charts change now also typechecks vega: verified (the last commit touches only that test; the scope helper picks vega on this head and not on the base, run locally).
  • .github/scripts/typecheck-scope.test.mjs: clear.
  • docs/specs/components/VegaChart/VegaChart.spec.md: clear (the code falls short of its FR1; see the finding).
  • packages/vega/README.md: finding (precedence promise).
  • packages/vega/package.json: clear.
  • packages/vega/src/VegaChart.doc.mjs: finding (precedence promise).
  • packages/vega/src/VegaChart.test.tsx: clear.
  • packages/vega/src/VegaChart.tsx: finding (precedence promise in the component doc); one comment-style note.
  • packages/vega/src/manifest.test.ts: clear.
  • packages/vega/src/types.ts: finding (precedence promise); the inherited doc-comment note.
  • packages/vega/src/vegaLiteConfig.test.ts: no case for axes Vega-Lite places itself (part of the finding).
  • packages/vega/src/vegaLiteConfig.ts: finding (orient guess, and the withAstryxConfig doc promise); five comment-style notes.
  • packages/vega/tsconfig.build.json: clear.
  • packages/vega/tsup.config.ts: clear.
  • pnpm-lock.yaml: clear.
  • vitest.config.ts: clear.

Automated review (maintainer link)

Comment thread packages/vega/src/vegaLiteConfig.ts Resolved
@cixzhang

cixzhang commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

🤖 (Posted by Cindy's agent.) A heads-up, @AKnassa: the latest automated review found one real bug, so we're adding a fix on your branch (credited to you as co-author) to keep this moving toward merge.

  • The bug: the code that works out which axes a chart draws reads each axis's side only from the encoding. Charts with two y-axes, or an axis whose side is set with orient in the config, end up themed on the wrong side.
  • The fix: read the axis side from where Vega-Lite actually takes it, including orient overrides and dual-axis layers, with tests for both cases.
  • Two small review items go in the same commit.

You're very welcome to review the commit when it lands. If anything doesn't match what you intended, just say so here. Thank you!

…xis values

A layer's second independent axis moves to the opposite side, and an
orient in the axisX, axisY or axis config moves a channel's axes. The
caller's orient blocks now keep their rank on those axes. Also shortens
comments per review and corrects the CompileOptions.config doc.

Co-authored-by: AKnassa <AKnassa@users.noreply.github.com>
@cixzhang
cixzhang marked this pull request as draft December 3, 2026 11:55
@cixzhang

cixzhang commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

🤖 (Posted by Cindy's agent.) Following up on my note above, @AKnassa: the fix is now on your branch in one commit, crediting you as co-author. Charts with two y-axes, or an axis side set with orient in the config, now get the right theming on the right side, with three tests that compile real Vega-Lite specs. The commit also applies the review's comment-style suggestions and a doc line in types.ts. Review welcome whenever you have a moment. Thank you!

@cixzhang

cixzhang commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec eeeaab2

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the component:VegaChart record approved for this head settles the direction, but in three cases the theme still overrides a caller's or a spec's config, against FR1 and the description's Precedence section.

  • The theme's line and point blocks override a caller's or a spec's mark config, so compileOptions={{config: {mark: {strokeWidth: 6}}}} leaves a line chart at the theme's 2 px line (reproduced locally against real Vega-Lite and in Storybook); drop a theme line or point key that mark sets, as the axis guard already does for axis keys.
  • The theme's scale.bandPaddingInner overrides the per-mark band padding keys, because Vega-Lite reads the generic key before barBandPaddingInner, rectBandPaddingInner and tickBandPaddingInner, so {scale: {barBandPaddingInner: 0.5}} compiles to 0.1 (reproduced locally); set the theme's 0.1 through those three keys instead.
  • Axes Vega-Lite derives from an inherited encoding or a repeated layer are not counted, because axesIn reads only each node's own encoding (vegaLiteConfig.ts:259-279), so with independent scales a layer child that inherits x or y from the parent, or a repeat: {layer} chart, keeps the theme's top domain line under axisTop: {domain: false} and drops the theme's axisY.domain from the right axis when only axisLeft is set; merge each child's encoding over its parent's and expand a repeated layer before counting.

The README, types.ts, VegaChart.tsx and VegaChart.doc.mjs describe the same caller-on-top order, so they become accurate once the code is fixed. A real-compile test for each case would pin it, like the existing precedence tests in vegaLiteConfig.test.ts.

Claims and files checked

Review mode: full; reason: author-not-engowner

  • Claim: Vega-Lite charts are themed by default with the charts package's palette: verified (code, the pull request's tests run locally, Storybook captures).
  • Claim: charts keeps its token list private and Vega takes ten slots from it, the range used before: verified.
  • Claim: the merge helper stays internal and the vega package does not export it: verified (the vega barrel is unchanged).
  • Claim: the core peer follows main's version, as charts' peer does: verified.
  • Claim: the new record states the order in one requirement and its table names the component's props: verified.
  • Claim: the theme config is compiled as the base from the active theme, which the base never applied: verified.
  • Claim: a series colored blue in a chart is the same blue here: verified (same ten tokens, same order).
  • Claim: charts and core are peers and the manifest test checks every imported Astryx package is a peer: verified (test passes locally).
  • Claim: native Vega specs are not themed: verified (tests; the native story is pixel-identical).
  • Claim: a chart with no spec renders an empty container and reports through onError: verified (test).
  • Claim: precedence is theme, then compile options, then the spec's own config: false (all three findings).
  • Claim: merging is recursive, so a partial override replaces only that key: verified (tests).
  • Claim: the theme sets four per-axis blocks, resolved in Vega-Lite's stated order: verified (code and Vega-Lite's source).
  • Claim: a caller's or spec's axis key always outranks the theme's per-axis value: false (third finding).
  • Claim: a partial-config caller gets the theme for every key it leaves out: false (third finding).
  • Claim: field-derived axis and legend titles do not render under the theme: verified (compiled locally).
  • Claim: vega is private and outside the release group, and the changeset check rejects private packages: verified.
  • Claim: vega ships to canary from main with its peers stamped to the canary version: verified (release workflow).
  • Claim: no package in the release group changes: verified (no changed file there; the API report lists no change).
  • Claim: stable users get the change when vega is published with its own changeset: not checkable here (a future release step).
  • Claim: the lab interaction layers are out of scope: verified (no such file changed).
  • Claim: the writing rubric finds no narration, research, change evidence, alternatives, references, open questions or status in the record: verified by reading the record.
  • Claim: the listed tests cover the compile path, a missing spec, the color-mode rebuild, the config, the palette, real-compile precedence and the manifest: verified (91 tests pass locally); CI has not run them at this head.
  • Claim: the owner approved the record: verified (approval at this head).
  • Claim: a Charts change now also typechecks vega: verified (scope computed locally).
  • File .github/scripts/typecheck-scope.test.mjs: clear.
  • File docs/specs/components/VegaChart/VegaChart.spec.md: clear as a record; the code does not yet meet its FR1 (findings).
  • File packages/vega/README.md: restates the precedence the findings break.
  • File packages/vega/package.json: clear.
  • File packages/vega/src/VegaChart.doc.mjs: restates the precedence the findings break.
  • File packages/vega/src/VegaChart.test.tsx: clear.
  • File packages/vega/src/VegaChart.tsx: clear apart from its doc comment restating the precedence.
  • File packages/vega/src/manifest.test.ts: clear.
  • File packages/vega/src/types.ts: clear apart from the compileOptions doc restating the precedence.
  • File packages/vega/src/vegaLiteConfig.test.ts: clear; does not cover the three cases.
  • File packages/vega/src/vegaLiteConfig.ts: all three findings.
  • File packages/vega/tsconfig.build.json: clear.
  • File packages/vega/tsup.config.ts: clear.
  • File pnpm-lock.yaml: clear (two workspace links).
  • File vitest.config.ts: clear.

Automated review (maintainer link)

Comment thread packages/vega/src/vegaLiteConfig.ts Resolved
Comment thread packages/vega/src/vegaLiteConfig.ts Resolved
Comment thread packages/vega/src/vegaLiteConfig.ts Resolved
…rited or repeated layer axes, keep their rank over the theme

Co-authored-by: AKnassa <AKnassa@users.noreply.github.com>
@cixzhang

cixzhang commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 19b5619

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The approved VegaChart record settles the direction, and the earlier precedence gaps are fixed: mark versus line/point, generic band padding, and inherited or repeated layer axes. One gap remains.

  • The theme's axis, legend and title blocks override a caller's or a spec's guide and title styles: in a real render, style['guide-label'], style['guide-title'], style['group-title'], style['group-subtitle'] and a style named from the caller's axis config all work without the theme but are ignored with it, against the record's FR1 and the description's "theme, then compileOptions.config, then the spec's config" order (vegaLiteConfig.ts:385-459).

Next step: leave out a theme axis, legend or title key when the caller's or the spec's config sets the matching property in the style that paints that text, or in a style the config names, and add real-render tests for a caller and a spec guide-label fill. Giving the theme a rank that Vega-Lite places below every caller key would close this class at once. All 95 vega tests pass and the package typechecks when reproduced locally; CI has not run on this head because the pull request is a draft.

Claims and files checked

Review mode: full; reason: requested

Claims:

  • Vega-Lite specs compile with the theme config from the active theme as their base: verified (VegaChart.tsx:118-124; test "rebuilds a Vega-Lite View with the new mode's theme config").
  • Before this change the chart rendered with Vega's defaults: verified by reading the base (compile(spec, compileOptions) only) and by base frames.
  • The categorical range comes from the charts palette, so <Chart> and Vega share the same blue: verified (same ten tokens in the same order; <Chart> resolves them from the same theme tokens; test "draws its categorical range from the shared token list").
  • Charts and core are peers, and a manifest test checks every imported Astryx package is a peer: verified (package.json peers; manifest.test.ts scans every non-test source file; no other shipped file imports an Astryx package).
  • Native Vega specs are not themed and take parseConfig: verified (VegaChart.tsx:121-124; Radial Plot frames identical).
  • A chart with no spec renders an empty container and reports through onError: verified (test "renders an empty container and reports through onError when spec is missing").
  • Precedence is theme, then compileOptions.config, then the spec's config: false for guide and title styles (blocking finding above).
  • Merging is recursive, so a partial axis override replaces only that key: verified (test "keeps theme values the user did not override").
  • The theme sets the four per-axis blocks, and Vega-Lite's axis resolution order is as described: verified (vegaLiteConfig.ts:77-92; Vega-Lite's axis config resolution).
  • A caller's or spec's key in an earlier axis block wins over the theme's per-axis value, so a generic axis grid adds the x grid and a y-channel grid off removes the y grid: verified (real-compile tests for caller and spec).
  • A partial config gets the theme for the keys it leaves out; field-name titles do not render, and a caller restores a title in the encoding or by unsetting it in config: verified (story frames; local title probe).
  • No changeset because vega is private, outside the release group, rejected by the changeset check, and shipped only to canary: verified (.changeset/config.json, scripts/check-changesets.mjs:125, the canary publish step in release.yml).
  • No package in the release group changes: verified (file list).
  • The lab interaction layers are out of scope: verified (no such file changed).
  • The new record carries no narration, research, references, open questions or project status: verified (record read whole).
  • The vega tests listed under Testing run in CI and cover the stated cases: verified (vitest.config.ts includes them in the ui project; cases read; all 95 pass locally; CI skipped this draft head).
  • The owner approved the VegaChart record: verified (spec-owner approval for this head).
  • A Charts change now also typechecks vega because vega peers on charts: verified by reading typecheck-scope.mjs:95 (follows peerDependencies).
  • Theme per-axis values follow the axes Vega-Lite places itself (second independent layer axis, configured orient): verified (tests under "axes Vega-Lite places itself").
  • Charts does not export the categorical token list and the theme merge stays internal: verified (charts and vega entry points unchanged).
  • The core peer follows main's version as charts' peer does: verified (0.7.18 on both).
  • The record's Public concepts table names the component's props as built: verified (each row matches VegaChartProps; inherited div attributes pass through and are not rows).

Files:

  • packages/vega/src/vegaLiteConfig.ts: finding (guide and title styles).
  • packages/vega/src/VegaChart.tsx: clear.
  • packages/vega/src/types.ts: clear (states the precedence the finding bounds).
  • packages/vega/src/VegaChart.doc.mjs: clear (states the precedence the finding bounds).
  • packages/vega/README.md: clear (states the precedence the finding bounds).
  • docs/specs/components/VegaChart/VegaChart.spec.md: clear.
  • packages/vega/src/vegaLiteConfig.test.ts: clear (no style case; see finding).
  • packages/vega/src/VegaChart.test.tsx: clear.
  • packages/vega/src/manifest.test.ts: clear.
  • packages/vega/package.json: clear.
  • pnpm-lock.yaml: clear.
  • packages/vega/tsup.config.ts: clear.
  • packages/vega/tsconfig.build.json: clear.
  • vitest.config.ts: clear.
  • .github/scripts/typecheck-scope.test.mjs: clear.

Automated review (maintainer link)

Comment on lines +447 to +450
// Vega-Lite ranks a mark type's block above `mark`, so a theme `line` or
// `point` value would outrank a `mark` key the caller or the spec sets.
const markKeys = setIn('mark');
for (const key of ['line', 'point']) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guard covers per-axis blocks and line/point, but the theme's axis, legend and title values (lines 63-108 and 175-181) still outrank the style entries Vega paints the same text with. In a real Vega-Lite 6.5.0 / Vega 6.4.0 render, compileOptions={{config: {style: {'guide-label': {fill: 'red', fontSize: 20}}}}} gives red 20px axis labels without the theme and the theme's 12px secondary text with it. A spec's own config.style loses the same way, as do guide-title on legend titles, group-title and group-subtitle, and a style named from the caller's axis config. component:VegaChart FR1 puts the caller's and the spec's config above the theme. Drop a theme axis, legend or title key when the caller or the spec sets the matching property in that style (or in a style its config names), and add real-render tests for a caller and a spec guide-label fill.

Co-authored-by: AKnassa <AKnassa@users.noreply.github.com>
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Dec 3, 2026
@cixzhang

cixzhang commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec e3d7c92

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Dec 3, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the themed default is decided and the earlier precedence fixes hold, but filled points disappear under the theme and a few claims overstate what callers can override.

  • The theme's point fill hides filled points and overrides a caller's point colour: point.fill (packages/vega/src/vegaLiteConfig.ts:121) uses the card background token, so a filled: true point, a line's point: true dots, and a caller's or spec's mark/point color with filled: true all render in the background colour, against component:VegaChart FR1 (reproduced locally with real Vega-Lite renders and Storybook frames).
  • The precedence claims leave out the named-style gap: the description's Precedence section, the README Theming section and compileOptions table row, the VegaChart, CompileOptions and withAstryxConfig JSDoc, and VegaChart.doc.mjs state the caller-wins order without the named-style exception the record now records, and "the config blocks FR1 lists" names no blocks.
  • The config title workaround in the description does not work: a title string in compileOptions.config (for example axisX.title) renders no axis title, so only an encoding title or title: undefined in the config brings titles back.

Required CI has not run on this draft head; the vega tests pass locally.

Claims and files checked

Review mode: full; reason: author-not-engowner

  • Claim: charts keeps its categorical token list private — verified (charts files unchanged; the list is module-private).
  • Claim: Vega's categorical range comes from the charts palette, ten slots as before — verified (vegaLiteConfig.ts:126, palette test).
  • Claim: withAstryxConfig stays internal — verified (src/index.ts unchanged).
  • Claim: the core peer follows main's version, as charts does — verified (0.7.18 on main; charts peers 0.7.18).
  • Claim: the new record states the order in one FR and its Public concepts table names the props as built — verified.
  • Claim: Vega-Lite charts are themed by default and native specs are unchanged — verified (tests, frames).
  • Claim: before this change no theme config was applied — verified (base VegaChart.tsx:174).
  • Claim: a series blue in <Chart> is the same blue here — verified (Chart.tsx:319 uses the same palette).
  • Claim: charts and core are peers, and the manifest test checks every imported Astryx package is a peer — verified (test passes; vega imports only those two).
  • Claim: native specs skip the theme; pass parseConfig — verified (VegaChart.tsx:122-124).
  • Claim: a missing spec renders an empty container and calls onError — verified (test).
  • Claim: precedence is theme, then caller config, then spec config — false (named styles; filled point colour).
  • Claim: merging is recursive, so {axis: {grid: true}} replaces one key — verified (tests).
  • Claim: per-axis theme values step aside for caller and spec axis keys, with the two examples — verified (tests).
  • Claim: a partial config gets the theme for every key it leaves out — verified.
  • Claim: titles can be set in the encoding or in the config — false for the config (no title renders).
  • Claim: vega is private, outside the release group, and the changeset check rejects private packages — verified (.changeset/config.json, check-changesets.mjs:125).
  • Claim: vega ships to canary from main — reported.
  • Claim: no release-group package changes, and the lab interaction layers are out of scope — verified (diff).
  • Claim: the vega tests run in CI under fork rules — reported (CI skipped at this draft head; 95 tests pass locally).
  • Claim: named styles lose to the theme (Known limits) — verified; "the order holds for the config blocks FR1 lists" — false.
  • Claim: the owner approved the record — verified (approval for this head).
  • Claim: a Charts change now also typechecks vega — verified by reading the scope script.
  • Claim: carried fixes for drawn axes, inherited and repeated layer axes, and per-mark band padding — verified (tests); line and point values stepping aside for mark keys — false for mark.color with filled.
  • Claim: writing rubric results — reported.
  • File .github/scripts/typecheck-scope.test.mjs — clear.
  • File docs/specs/components/VegaChart/VegaChart.spec.md — gap row bound (precedence claims finding).
  • File packages/vega/README.md — precedence claims finding.
  • File packages/vega/package.json — clear.
  • File packages/vega/src/VegaChart.doc.mjs — precedence claims finding.
  • File packages/vega/src/VegaChart.test.tsx — clear.
  • File packages/vega/src/VegaChart.tsx — precedence claims finding (JSDoc).
  • File packages/vega/src/manifest.test.ts — clear.
  • File packages/vega/src/types.ts — precedence claims finding.
  • File packages/vega/src/vegaLiteConfig.test.ts — no filled-point case (point fill finding).
  • File packages/vega/src/vegaLiteConfig.ts — point fill finding.
  • File packages/vega/tsconfig.build.json — clear.
  • File packages/vega/tsup.config.ts — clear.
  • File pnpm-lock.yaml — clear.
  • File vitest.config.ts — clear.

Automated review (maintainer link)

Comment on lines +447 to +450
// Vega-Lite ranks a mark type's block above `mark`, so a theme `line` or
// `point` value would outrank a `mark` key the caller or the spec sets.
const markKeys = setIn('mark');
for (const key of ['line', 'point']) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guard drops only same-named keys, but the theme's point.fill (line 121, the card background token, the same as background on line 94) is read before any color, and filled points get no stroke. In real Vega-Lite renders, a spec's mark: {type: 'point', filled: true} draws invisible points, a line's point: true dots become gaps in the line, and a caller's or spec's mark: {color: '#c00000', filled: true} (or point: {color, filled: true}) paints the card colour instead of red. Leaving point.fill out when points are filled (a filled or color in mark/point config, a filled: true mark, a line point overlay), or dropping it, plus a real-render test for each case, would keep FR1's caller-on-top order.

Comment thread packages/vega/README.md Resolved
…the named-style exception

Co-authored-by: AKnassa <AKnassa@users.noreply.github.com>
@cixzhang

cixzhang commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec cdc97a6

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the themed default is decided and filled point marks and mark-level dots keep their colour, but dots that config or a shape encoding turns on still vanish, and one prop doc still overstates the caller-wins order.

  • The theme's point fill still hides dots that config or a shape encoding turns on: drawsFilledPoint (packages/vega/src/vegaLiteConfig.ts:480-507) and the key check at :461-470 miss the dots that a caller's or spec's line.point, area.point or trail.point config, or a shape encoding, turns on, so those dots render in the card background against component:VegaChart FR1 (reproduced locally with real Vega renders); detect the overlay as Vega-Lite does and add tests for those cases.
  • VegaChartProps.compileOptions still omits the named-style exception: packages/vega/src/types.ts:170-171 says the caller's config overrides the theme with no exception, unlike the README and the other JSDoc, and the record's gap row bounds the gap with "the config blocks it lists" although FR1 lists none.

CI has not run on this draft head; the 99 vega tests pass locally.

Claims and files checked

Review mode: same-head; reason: none

  • Claim: Charts keeps its categorical token list private — verified (module-private list in getChartColors.ts; charts files unchanged).
  • Claim: Vega's categorical range comes from the charts palette, ten slots as before — verified (vegaLiteConfig.ts:126, palette tests).
  • Claim: withAstryxConfig stays internal — verified (src/index.ts unchanged).
  • Claim: The core peer follows main's version, as charts does — verified (core 0.7.18 on the base, head and main; charts peers core 0.7.18).
  • Claim: The new record states the order in one FR and its public concepts table names the props as built — verified (FR1; the table matches VegaChartProps' own props).
  • Claim: Vega-Lite charts are themed from the active theme, and before this no theme config was applied — verified (tests; the base compile call passes only the caller's options).
  • Claim: A series coloured blue in <Chart> is the same blue here — verified (both read the charts token list through getChartColorsFromResolver).
  • Claim: Charts and core are peers, and the manifest test checks every imported Astryx package is a peer — verified (test passes locally; src/ has no subfolders).
  • Claim: Native Vega specs are not themed; pass parseConfig — verified (VegaChart.tsx:123-125, native View test).
  • Claim: A chart with no spec renders an empty container and reports through onError — verified (test).
  • Claim: Precedence is theme, then caller config, then spec config, apart from named styles — false for dots that config or a shape encoding turns on (finding).
  • Claim: Merging is recursive, so a partial override replaces one key — verified (tests).
  • Claim: Per-axis theme values step aside for caller and spec axis keys, with both examples — verified (tests).
  • Claim: A partial config keeps the theme for every key it leaves out — verified (tests).
  • Claim: The theme hides field-derived titles; an encoding title or title: undefined in axis or legend config brings them back, and a title string in config renders none — verified (renders run locally).
  • Claim: Vega is private and outside the release group, and the changeset check rejects private packages — verified (.changeset/config.json, scripts/check-changesets.mjs).
  • Claim: Vega ships to the canary tag from main — reported (the canary job publishes private canary-only packages and stamps their Astryx peers to the canary version; registry state not checked).
  • Claim: No release-group package changes, and the lab interaction layers are out of scope — verified (diff).
  • Claim: The vega tests run in CI under fork rules and cover the listed cases — reported (CI has not run on this draft head; each listed case is in the tests, which pass locally).
  • Claim: Writing rubric results — reported.
  • Claim: Named styles lose to the theme, and the gap is in the record's verification map — verified.
  • Claim: Caller-on-top holds for keys such as axis, axisX, legend, title, mark and point — verified for those keys (tests).
  • Claim: The owner approved the record — verified (approval for this head).
  • Claim: A Charts change now also typechecks vega — verified (scope function run locally on both trees).
  • Claim: Carried fixes for placed, inherited and repeated layer axes, mark keys over line/point, and per-mark band padding — verified (tests).
  • Claim: The point fill steps aside so filled points keep their colour — false for dots from line/area/trail point config or a shape encoding (finding).
  • Claim: The record's approval came at an earlier head, for the owner to confirm — superseded (the owner approved this head).
  • Claim: Main is merged in without a rebase, keeping the author's commits — verified (history).
  • File .github/scripts/typecheck-scope.test.mjs — clear.
  • File docs/specs/components/VegaChart/VegaChart.spec.md — gap row bound (prop-doc finding).
  • File packages/vega/README.md — clear.
  • File packages/vega/package.json — clear.
  • File packages/vega/src/VegaChart.doc.mjs — clear.
  • File packages/vega/src/VegaChart.test.tsx — clear.
  • File packages/vega/src/VegaChart.tsx — clear.
  • File packages/vega/src/manifest.test.ts — clear.
  • File packages/vega/src/types.ts — prop-doc finding.
  • File packages/vega/src/vegaLiteConfig.test.ts — no config- or shape-driven dot case (point fill finding).
  • File packages/vega/src/vegaLiteConfig.ts — point fill finding.
  • File packages/vega/tsconfig.build.json — clear.
  • File packages/vega/tsup.config.ts — clear.
  • File pnpm-lock.yaml — clear.
  • File vitest.config.ts — clear.

Automated review (maintainer link)

filled?: boolean;
point?: unknown;
};
if ((type === 'point' && filled === true) || (point && point !== false)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This misses the dots Vega-Lite turns on outside the mark object: point in the caller's or the spec's line, area or trail config, and a shape encoding on a line (Vega-Lite's path-overlay normalizer makes them filled points). They still read the theme's point.fill, so compileOptions={{config: {line: {point: true}}}} renders background-coloured gaps where the dots were. Checking point in that mark type's config from both configs and encoding.shape here, with real-render tests for a caller line.point, a spec config.line.point and a shape encoding, would cover them.

Comment thread packages/vega/src/types.ts Outdated
Comment on lines +170 to +171
* `config` here is merged *on top of* the Astryx theme config the component
* applies by default, so it overrides the theme rather than replacing it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still reads as unconditional: a caller's style['guide-label'] does not override the theme's axis label text. The sentence from CompileOptions.config above ("A named style entry does not outrank the theme's axis, legend and title text.") would match the README and the record.

…s on keep their color

Co-authored-by: AKnassa <AKnassa@users.noreply.github.com>
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Dec 3, 2026
@cixzhang

cixzhang commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 680530d

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Dec 3, 2026

This branch was successfully deployed

1 active deployment
Preview — 680530dc Deployed Dec 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot. community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants