Skip to content

菜单图标统一成色块:对象和它的视图用对象的颜色,报表、仪表盘、页面等一律浅灰;没设颜色的对象自动分配一个颜色 #36141

Closed

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

立卡门类别:④ 协调节点的子单,承父单 #34571(专题:控制台核心页面体验,维护者直派)。⛔ 不是认领。优先级 p2(协调席定的,维护者未指定)。

维护者说过的(2026-11-21 至 22)

  • 「还有左侧有一些不是对象的菜单,图标风格就不一致,还有现有的应用没有设置对象颜色的情况下,好像风格太统一了,是否建议优化。」
  • 「非对象菜单项 都是些什么,你建议什么颜色?」
  • 协调席答:非对象菜单项一律用浅灰色块、不按种类上色;问「可以吗?」,维护者:「同意,立卡」

现状(界面 db9e34ad32、服务端 18.6.0,本机环境装了 HotCRM 6.5.0,浏览器实测,1440 宽,浅色)

现状:销售应用的侧栏

  • 指向对象的菜单项(线索、客户、联系人、商机、合同、订单、报价、产品、价格表、回款节点,以及「我的任务、我的商机、我的线索」):圆角色块里一个图标(对象加颜色:从固定的一小组色板里选,图标画成彩色圆角小方块里的白色图标,菜单、标题、关联标签处处同一个样子 #35985 做的)。HotCRM 没有给对象设颜色,所以全部是同一个灰色块,色块没有起到区分作用。
  • 不指向对象的菜单项(首页、销售主页、销售业绩、产品目录等):还是线条图标,没有色块。和上面的放在同一列,一个实心一个线条,轻重不一样。
  • 平台里菜单项的种类(packages/spec/src/ui/app.zod.ts):对象、仪表盘、页面、链接、报表、动作、组件、文档,另有分组和分隔线。HotCRM 6.2.0 的源码里:对象 28 个,报表 12、文档 7、仪表盘 6、组件 3、页面 1。非对象的加起来 29 个,和对象的差不多各占一半。
  • 「对象没设颜色就画成灰色」写在 packages/spec/src/data/object-icon.ts:26。

要做的

规则一句话:颜色只表示「这是哪个对象」,不表示「这是哪种菜单」。所有菜单项用同一个大小、同一个圆角的色块。

  1. 非对象菜单项也画成色块:仪表盘、报表、页面、组件、文档、链接、动作,都是和对象同样大小、同样圆角的块,浅灰底、深灰图标。图标按种类取(图表、书页、向外的箭头等),或用菜单项自己配的图标。
  2. 对象菜单项:对象的颜色,实心,白色图标。和现在一样。
  3. 对象的某个视图(菜单项类型是对象、另外指定了视图的,如「我的商机」):和它的对象同色。
  4. 没设颜色的对象自动分配一个颜色:从固定色板里(OBJECT_COLORS,去掉灰色)按对象的接口名算出一个。同一个对象在任何地方(侧栏、列表头、搜索、最近使用、关联小块、记录页头部)都是同一个颜色;刷新、换人看、换环境都不变。对象设了颜色的以设置为准。只在显示时计算,不写回数据。
  5. 分组标题没有图标的照旧;分隔线照旧。
  6. 「最近使用」「收藏」里的条目按它指向的东西套同样的规则。
  7. 手机上的应用首页菜单(设计板图 43)同样处理。

不做的

  • 不按菜单种类上彩色(不做「报表蓝、仪表盘紫」)。
  • 不做「报表跟着它主要统计的对象的颜色」。
  • 不改色板本身,不加颜色。
  • 不改 Studio 里选颜色的界面。
  • 不改 HotCRM 这类应用包:给主要对象声明颜色是包那边的事,另行处理。

验收

  • HotCRM 销售应用的侧栏:每个菜单项前面都是同样大小的圆角色块,没有裸的线条图标。
  • 线索、客户、联系人、商机这些对象的色块颜色不全相同;同一个对象在侧栏、它的列表页头部、搜索结果、别的记录里的关联小块上是同一个颜色。
  • 刷新页面、换一个账号登录:每个对象的颜色不变。
  • 「我的商机」的色块和「商机」同色。
  • 首页、销售业绩、产品目录这类非对象项:浅灰底、深灰图标。
  • 在 Studio 里给「客户」设一个颜色并发布:侧栏和别处都变成设的颜色。
  • 深色主题下:浅灰块和彩色块都看得清。
  • PR 正文附 HotCRM 侧栏改动前后的截图(浅色和深色),并说明颜色是怎么从对象名算出来的。

协调席自己加的(不是维护者原话)

  • 第 4 项「没设颜色的对象自动分配一个颜色」。维护者提出的是问题(「没有设置对象颜色的情况下,好像风格太统一了」),自动分配是协调席给的做法;维护者说「同意,立卡」时回答的是关于非对象菜单项的那个问题,没有对自动分配单独表态。协调席把它放进本卡,是因为它正是维护者那句话要解决的事。维护者如果不同意自动分配,本卡去掉第 4 项即可,其余不受影响。
  • 第 4 项里「按接口名算、只在显示时算、不写回数据」「色板去掉灰色」。
  • 第 3 项视图跟对象同色;第 6、7 项。
  • 「不做的」各条。

这一项改动了 #35985 里「没设颜色用中性色」的做法;那张卡已合并一部分,所以另立本卡,不改那张。

没有核对的

Reader: domain:ui 车道。packages/spec/src/data/object-icon.ts(色板和灰色兜底)、ui/packages/app-shell/src/layout/UnifiedSidebar.tsx、views/nav-menu-renderer.tsx、画对象色块的公共组件(#35985 的 PR 里)。

Dedupe: 菜单 图标 色块、对象 颜色 自动 分配、侧栏 图标 统一(objectstack,open)→ 都是 0。相关:#35985(对象颜色,进行中)、#36112(去掉顶栏,侧栏重排)。

Activity

  1. added
    enhancement
    priority:p2
    domain:ui
    on Nov 21, 2026
  2. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

    维护者指示(2026-11-21T16:44Z):协调席问「菜单图标的卡 #36141 也一起通知派发吗?」,维护者:「一起派发」。

  3. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:queue; rationale: area:ux · Feature · menu icons become colour tiles: objects and their views in the object colour, reports, dashboards and pages in light gray, and objects with no colour get one assigned; maintainer: 「同意,立卡」 → p2 as set by the coordinator · size M.

  4. added
    pm:queue
    on Nov 21, 2026
  5. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Claim: PM loop · 2026-11-21T16:55Z · area b1-CX (epic #34571; taken from the mailbox, record 7065885381, the maintainer's 「一起派发」).
    Area: b1-CX
    Session: session_01L6bhgWopgUHAVkDYdjqW8g (card thread)
    Account: os-sales
    Branch: claude/project-thread-j1p8m3
    Seat: repo:objectstack#1
    Domain: domain:ui
    File surface: @object-ui/components custom/object-icon-tile.tsx (a neutral tile variant, exported), @object-ui/layout NavigationRenderer (leaf and action arms), app-shell nav-menu-renderer.tsx, UnifiedSidebar.tsx (Recent, Favorites, Starred), HomeRail.tsx (Recently accessed); tests in the existing harness files; changeset.
    Container & model: L, card thread, model: opus, effort: high
    Clause-②: yes (widening): a new exported neutral tile on @object-ui/components, possibly a kind-glyph helper on @object-ui/layout; re-measured on built declarations before push.
    Metadata-protocol: none
    Premise (thread, read on main f5553525, file build-seat1/36141/premise-read.md in the project folder): holds for items 1–3 and 5–7. Authored icon always wins; non-object kinds get one neutral tile (light grey square, dark grey glyph, same size and radius as the object tile), no per-kind colour; the emoji in Recent, Favorites and Starred go; the phone home menu (item 7) rides the same renderer and is checked by a 375 screenshot.
    Basis: card #36141; epic #34571.
    Scope, the seat's reading: items 1–3 and 5–7 now. Item 4 (an object with no colour gets an automatic colour) is held out of this branch: it was added by the coordinator, it reverses #35985's merged neutral fallback, and it would move the PR onto the spec text (Metadata-protocol: semantic, Fable L2). It went through a Fable review and is with the maintainer on a decision card; the recommendation is to keep the grey fallback and let packages set colours. If he rules for automatic colour it comes in as its own commit here and this claim is amended.
    Resume-from: none
    Fold-or-serial: this card goes before #36112 (the top bar removal re-orders the sidebar and will merge main over this card; both touch UnifiedSidebar.tsx). Overlap: #36131 does not overlap items 1–3, 5–7 (item 4 would touch objectViewPageHeader.tsx); #36089 no file overlap. overlap-check.mjs before each push. Declaration L2 at TIER_DEFAULT on the green head; L1 at L1-b. The PR carries Fixes #36141 only if item 4 is ruled out or built; while item 4 is open the PR says Part of #36141.

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 21, 2026
  7. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Maintainer ruling · 2026-11-21T22:24Z · #36141 item 4 (an object with no colour: keep gray, or colour it automatically), reviewed by fable first (build-seat1/36141/fable-decision.md in the project folder)

    At 2026-11-21T22:23Z the maintainer picked option 0 on the seat's decision card, 「保持灰色,由应用包自己设色」:

    • An object with no color keeps drawing the neutral gray tile, as 对象加颜色:从固定的一小组色板里选,图标画成彩色圆角小方块里的白色图标,菜单、标题、关联标签处处同一个样子 #35985 shipped. No automatic colour by object name.
    • So item 4 leaves this card, and with it the acceptance lines that belonged to it: the four main objects not all the same colour, colours stable across refresh and accounts, and the PR body explaining the algorithm; and the second half of the title.
    • Until an app package sets colours, its sidebar reads in gray tones (object tiles dark gray, non-object tiles light gray). That is the ruled state, not a defect.
    • HotCRM picks its objects' colours by hand on its own card, once the platform publishes a spec version that carries color and HotCRM upgrades to it.

    Items 1–3 and 5–7 shipped in PR #36164 (merged 19:21Z, Part of). With item 4 ruled out, nothing is left on this card, so the seat closes it as completed.

  8. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Seat close · 2026-11-21T22:25Z · completed: items 1–3 and 5–7 shipped in PR #36164; item 4 ruled out by the maintainer (ruling above, keep gray). HotCRM's hand-picked colours ride their own HotCRM card.

  9. removed
    pm:dispatched
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:uxdomain:uienhancementpriority:p2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions