Uh oh!
There was an error while loading. Please reload this page.
fix(studio): record-page preview binds a real record + charts use field option colors - #1932
Merged
Merged
Conversation
The Studio page editor's Preview tab rendered a `type: 'record'` page's `record:*` blocks (details / highlights / path / alert / quick_actions) as the "bind a record to preview" placeholder — the metadata editor has no record route, so the author designed blind. The preview now fetches a handful of real records of the bound object (lookup / master_detail fields `$expand`ed so they show display names, not raw foreign-key IDs), auto-binds the first one, and wraps the canvas in a `<RecordContextProvider>` — mirroring the runtime `RecordDetailView`. A "Preview record" dropdown lets the author switch records, so `visible` CEL expressions (e.g. `record.status == 'in_review'`) and per-record field values re-render live. Verified against the app-showcase backend: previewing `showcase_task_detail` populates path/highlights/details/quick-actions, expands the `project` lookup to its name, and toggles the `record:alert` banner as the picked record's status crosses `in_review`. Tests + type-check pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
An `object-chart` grouped by a select/lookup field (e.g. project `health`) painted categories from the generic `--chart-1..5` palette, so a "Red" health slice rendered teal and "Green" rendered blue. The chart now resolves the category dimension's option colors (objectName+groupBy path, and the dataset path via the dataset's `object` + dimension `field`) and threads them to the renderer as a per-category `categoryColors` map that wins over the positional palette (falling back to it for categories with no option color). Pie/donut slices and bar cells now render in their semantic colors. Adds a renderer test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Jun 24, 2026
Merged
os-zhuang added a commit
that referenced
this pull request
Jun 24, 2026
#1947) DatasetWidget charts grouped by a select/lookup dimension (e.g. project health) now paint each category in its field option color instead of the generic --chart-1..5 palette — matching the object-chart view (#1932). Resolves the dimension field's option colors from the dataset's base object + dimension→field map and threads them to the renderer as a per-category categoryColors map. Extracts the value/label→color resolution into a shared buildOptionColorMap in @object-ui/core, reused by both DatasetWidget and ObjectChart. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes found dogfooding the Studio page designer (companion to framework page-schema fix#2254).
1. Record-page Preview binds a real record (
@object-ui/app-shell) — the Preview tab showedrecord:*blocks as the 'bind a record to preview' placeholder. Now fetches real records (lookups $expanded), auto-binds the first, adds a 'Preview record' dropdown, wraps the canvas in<RecordContextProvider>. visible CEL + per-record values re-render live.2. Charts use field option colors (
@object-ui/plugin-charts) — an object-chart grouped by a select field (e.g. health) painted the generic palette (Red->teal, Green->blue). Now resolves the dimension's option colors (objectName+groupBy and dataset paths) into a per-categorycategoryColorsmap that wins over the palette. Pie/donut + bar cells render semantic colors. Adds a renderer test.Verified in browser (record picker switching; health donut/status bars green/red/amber); AdvancedChartImpl.colors.test.tsx + PagePreview.test.tsx pass; typecheck clean.
🤖 Generated with Claude Code