Skip to content

Commit 6fdcf3e

Browse files
committed
chore(changeset): name platform-objects' new form row, and what a host without a colour resolver sees
The object-icon leaf header now says which of its names are exported. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgT9PKAmy86XfbYbZtW
1 parent 8342056 commit 6fdcf3e

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎.changeset/35985-object-color-tile.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
'@object-ui/app-shell': minor
66
'@object-ui/i18n': minor
77
'@objectstack/metadata-core': patch
8+
'@objectstack/platform-objects': minor
89
---
910

1011
feat(spec, ui): an object takes a colour from a fixed palette, and its icon is drawn as a white glyph on a square of that colour
@@ -15,8 +16,10 @@ Metadata-protocol: added
1516
- **`ObjectSchema.color` (new, optional).** One name from a closed palette of nine: `gray`, `blue`, `teal`, `green`, `amber`, `orange`, `red`, `pink`, `purple` (exported as `OBJECT_COLORS` and the `ObjectColor` type from `@objectstack/spec/data`). No free colour values: `color: '#ff0000'` is refused, and the refusal lists the nine names. An object without a `color` is drawn in the neutral `gray`. Nothing to migrate: every existing object stays valid and simply has no colour.
1617
- **The AI blueprint carries it too.** `BlueprintObjectSchema.color` is the same leaf (required-but-nullable on `SolutionBlueprintStrictSchema`, like `icon`), and its rule asks the model to colour every object and give each object of one solution a different colour while the palette lasts.
1718
- **`ObjectIconTile` (new, `@object-ui/components`).** Draws an icon name as a white glyph on a rounded square of a palette colour, in four sizes. Each name has a light-theme and a dark-theme value chosen so the white glyph keeps at least 3:1 contrast. `OBJECT_COLOR_TILE_CLASS` and `objectColorOrDefault` are exported with it.
18-
- **Navigation draws objects as tiles.** In the sidebar, the app-home menu and the phone menu, every entry that opens an object is drawn as that object's tile: the entry's own `icon` when it names one, else the object's, on the object's colour. Dashboards, pages and links keep their line icons. `NavigationRenderer` takes a new `resolveTargetColor` resolver (`NavTargetColorResolver`) beside `resolveTargetIcon`; the console answers it from the object metadata it already holds (`useNavTargetColor`).
19+
- **Navigation draws objects as tiles.** In the sidebar, the app-home menu and the phone menu, every entry that opens an object is drawn as that object's tile: the entry's own `icon` when it names one, else the object's, on the object's colour. Dashboards, pages and links keep their line icons. `NavigationRenderer` takes a new `resolveTargetColor` resolver (`NavTargetColorResolver`) beside `resolveTargetIcon`; the console answers it from the object metadata it already holds (`useNavTargetColor`). A host that passes no `resolveTargetColor` gets its object entries as gray tiles where it had line icons.
1920
- **The designer picks icon and colour together.** In the object's settings, the icon picker shows the nine colour swatches, and the trigger and every icon in the grid are previewed as the tile they become. The picker elsewhere (pages, apps, navigation entries) is unchanged: only objects carry a colour.
2021
- The other places that draw an object's icon (list and record headers, search, related-record chips, the designer's object lists) switch to the tile in a follow-up release.
2122

2223
`@objectstack/metadata-core`: the field-level-security reference table classifies the new `color` key as `keep` (a palette name names no field).
24+
25+
`@objectstack/platform-objects`: the generic object form's metadata-form packs ship the new `color` row's label and help text in all 10 locales.

‎packages/spec/src/data/object-icon.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import { z } from 'zod';
1111
*
1212
* Declared in its own module, outside the `data` barrel, so the blueprint
1313
* reads this leaf without the object schema joining the AI entry's module
14-
* graph, and the leaf does not join the package's published exports.
14+
* graph. `OBJECT_ICON_SCHEMA` and `OBJECT_COLOR_SCHEMA` stay out of the
15+
* package's published exports; the palette, `OBJECT_COLORS` and its
16+
* `ObjectColor` type, is re-exported from `@objectstack/spec/data` for the
17+
* console's tile and picker.
1518
*/
1619
export const OBJECT_ICON_SCHEMA = z.string().optional().describe('Icon name (Lucide/Material) for UI representation');
1720

0 commit comments

Comments
 (0)