You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a2dc858
Browse filesBrowse the repository at this point in the historyBrowse files
feat(ui): every menu row is a tile: objects in their colour, everything else on a light grey tile (#36164)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuFFKDUEw658BkLsJjATrqG7)_
Part of #36141
repo:objectstack#1 · os-sales · session_01L6bhgWopgUHAVkDYdjqW8g
Clause-②: yes (widening)
Metadata-protocol: none
The widening: `@object-ui/components` exports `NeutralIconTile`, its
props type `NeutralIconTileProps` and `NEUTRAL_ICON_TILE_CLASS`;
`@object-ui/layout` exports `NAV_KIND_ICON` and `resolveNavKindIcon`.
Nothing is removed or renamed, and no `packages/spec` path is touched.
`Part of`, not `Fixes`: the card's item 4 (an automatic colour for an
object with none) is on the maintainer's decision card and is not in
this branch. This PR delivers items 1–3 and 5–7.
## What changes
The rule, from the card: colour only says which object a row is, never
which kind of menu entry it is, and every row draws the same tile.
1. **Non-object menu entries are tiles.** In the sidebar
(`NavigationRenderer`) and the `nav:menu` page block, a `dashboard`,
`report`, `page`, `url`, `component`, `doc` or `action` entry draws
`NeutralIconTile`: the object tile's size, corners and glyph size, a
light grey square with a dark grey glyph (`gray-200` / `gray-700`,
swapped in the dark theme). The glyph is the entry's own `icon`, else
its kind's (`NAV_KIND_ICON`: `layout-dashboard`, `chart-column`, `file`,
`external-link`, `layout-grid`, `book-open`, `zap`). No kind has a
colour of its own.
2. **Object entries** keep their object's tile (white glyph on the
object's palette colour), unchanged.
3. **An object entry that opens a view** (`viewName`, e.g. "My Deals")
is its object's tile; pinned.
5. Group headings and separators draw no tile; pinned.
6. **Recent, Favorites and Starred** in the sidebar, and Home's
**Recently accessed**: a row about an object (the object, one of its
views, one of its records) draws that object's tile in its icon and
colour; a dashboard, page, report or Studio item draws the neutral tile
with its kind's icon. The emoji those rows drew (📊 📈 📄 📋) are gone.
`ContentItemTile` (app-shell, not exported) holds the rule for the
sidebar; Home's row reads the same object metadata it already read for
records.
7. **Phone app home menu** is the same `NavigationRenderer`
(`renderAppMenu('home')`), so it follows with no code of its own; see
the phone shots under Verification.
## Why
The sidebar mixed solid colour squares (objects) with bare outline icons
(everything else) in one column, which read as two weights. The
maintainer asked what the non-object entries are and what colour they
should take; the answer agreed was one light grey tile for all of them
(card body, 「同意,立卡」).
## Verification
- Unit: `components` `object-icon-tile-35985.test.tsx` (neutral tile:
one value per theme, glyph contrast ≥ 4.5:1 both themes, lighter than
every palette square, same shape as the object tile at all four sizes);
`layout` `NavigationRenderer.objectTile-35985.test.tsx` (every
non-object kind, an action and a row inside a group on the neutral tile;
a view on its object's colour; group heading and separator draw none;
kind glyphs); app-shell `UnifiedSidebar.favoritesMenu-12427.test.tsx`
(object and record favourites are object tiles, a dashboard favourite
neutral, no emoji; a Recent record object tile, a Recent metadata item
neutral). Flipped pins: the 30126 controls (a dashboard with no icon now
draws its kind's glyph, still never the object's), the 12604 Home rows
(view and object rows now draw the object's tile), and four sidebar
label lists that read the emoji as text.
- Local, against `f5553525`: those files plus every app-shell / console
test that mounts the sidebar, Home or `nav:menu` (119 files, 1,168
tests) pass; `type-check` for `@object-ui/components`,
`@object-ui/layout`, `@object-ui/app-shell` clean; `eslint` on the
changed files 0 errors.
- Browser: HotCRM (hotcrm main `1468877`, `objectstack dev`), console
`vite` from this branch, Sales app, 1440 and 375, light and dark, before
and after, in the project thread's evidence folder
(`build-seat1/36141/`): `*-sidebar-*`, `*-sidebar-recent-*`,
`*-home-recent-*`, `*-phone-app-home-*`. After: every Sales sidebar row
is a 20px rounded tile (24px on the phone); Home, Sales Home, Sales
Performance, Product Catalog, Inbox, Sales Activity and CRM Overview sit
on the light grey tile; the object rows are unchanged. HotCRM declares
no object colour, so its object tiles are all the neutral `gray` palette
square; that is item 4's question, not this PR's.
- Review delta `5c70f68e` (L2 S1, N1, N2, N6 on `eb36a397`): the
sidebar's Recent, Favorites and Starred rows ask the objects they name
in ONE batched presence read (`readRecentObjects`, moved out of
`HomePage.tsx` into `console/home/readRecentObjects.ts` and re-exported
there); a name not answered served draws the object tile in its neutral
colour and is never read by name. Pinned in
`UnifiedSidebar.favoritesMenu-12427.test.tsx` ("never asks a missing one
by name"), which fails with the gate removed (4 by-name calls name the
missing object). `CONTENT_KIND_ICON` spreads `NAV_KIND_ICON`;
`NavIconTarget`'s comment names the kind icon; the neutral-tile pin
compares it with every palette square. Local: 180 affected files / 2,021
tests pass, app-shell type-check clean, eslint 0 errors.
## Follow-ups (not in this PR)
- Item 4 (automatic colour) waits on the maintainer's decision card. If
it is chosen it lands as its own commit on this branch with its own
spec, changeset and L2 face.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (not touched)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgWopgUHAVkDYdjqW8g
<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgWopgUHAVkDYdjqW8g -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
feat(ui): every menu row is a tile: objects and their views in the object's colour, everything else on a light grey tile
8
+
9
+
Clause-②: yes (widening) — `@object-ui/components` adds `NeutralIconTile`, `NeutralIconTileProps` and `NEUTRAL_ICON_TILE_CLASS`; `@object-ui/layout` adds `NAV_KIND_ICON` and `resolveNavKindIcon`; nothing removed or renamed
10
+
Metadata-protocol: none
11
+
12
+
The sidebar drew an object entry as its object's colour tile and every other entry as a bare line icon, so one column mixed solid squares and outlines. Now every row is a tile of the same size and corners, and colour still says only which object a row opens:
13
+
14
+
-**Object entries, and object entries that open one of its views** (a `viewName`, such as "My deals"): the object's tile, as before.
15
+
-**Every other entry** (`dashboard`, `report`, `page`, `url`, `component`, `doc`, `action`): a light grey tile with a dark grey glyph, the entry's own `icon`, else its kind's (`NAV_KIND_ICON`: a dashboard, a column chart, a page, an outward arrow, a grid, a book, a bolt). No kind gets a colour of its own.
16
+
-**Recent, Favorites and Starred in the sidebar, and Home's "Recently accessed"**: an object, one of its views or one of its records is that object's tile; a dashboard, page or report is the neutral tile. The emoji these rows drew are gone.
17
+
- Group headings and separators are unchanged. The phone's app home lists the same menu, so it follows.
0 commit comments