Skip to content

应用图标各处一个样:没声明颜色的应用自动分配一个纯色,首页不再用渐变,下拉菜单不再是灰色块 #36157

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

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

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

  • 「应用下拉菜单中,应用图标的颜色那里来的」
  • 「你的建议呢?右侧首页的颜色为什么不一样」
  • 协调席建议「没声明颜色的应用自动分配纯色、各处统一、去掉首页的渐变」「应用和对象的颜色撞色不处理」,维护者:「同意」

现状(界面 db9e34ad32、服务端 18.6.0,本机环境浏览器实测加读代码)

应用的图标按它声明的品牌设置取(ui/packages/app-shell/src/layout/AppMark.tsx):声明了图标图片(branding.logo)就用图片;没有图片就把应用的线条图标画在一个色块上,色块是应用声明的主色(branding.primaryColor)。这部分各处一致。

图片和主色都没声明时,两处用了两套规则:

  • 首页的应用图标(console/home/launcherTile.ts):从 10 组渐变色里按应用名算出一组。
  • 下拉菜单、顶栏、手机首页左上角(layout/AppMark.tsx、layout/appTileColors.ts):一律中性灰色块。

所以 AI 搭建的「会议纪要」「CRM客户管理」在首页是橙黄渐变,在下拉菜单里是灰色。

现状:首页,两个没声明颜色的应用是渐变色

现状:应用下拉菜单,同样两个应用是灰色块

要做的

规则一句话:同一个应用在任何地方都是同一个图标、同一个颜色。

  1. 取应用图标和颜色的逻辑只留一套,首页、下拉菜单、顶栏的应用名(「去掉顶栏」后是侧栏第一行)、手机首页左上角、搜索和最近访问里的应用,都用它。
  2. 没声明图片也没声明主色的应用,自动分配一个颜色,不再是灰色块:从对象用的那组固定色板里(OBJECT_COLORS,去掉灰色)按应用的接口名算出一个。同一个应用永远同一个颜色,刷新、换人看、换环境都不变。只在显示时计算,不写回数据。
  3. 用纯色,不用渐变。首页的应用图标去掉渐变,改成和别处一样的纯色块加白色图标;大小可以保持现在的大图标。
  4. 声明了主色的以声明为准;声明了图片的用图片。这两种现在是对的,不改。
  5. 应用自动分配的颜色和它里面对象的颜色可能相同,不做错开处理。
  6. 自动分配的颜色只用在图标色块上,不改这个应用里主要按钮的颜色(没声明主色的应用,按钮仍用平台默认主色)。

不做的

验收

  • 一个没声明图片也没声明主色的应用(本机的「会议纪要」「CRM客户管理」):在首页、应用下拉菜单、手机首页左上角是同一个颜色的纯色块加白色图标;不是灰色,也不是渐变。
  • 两个这样的应用颜色可以不同;各自刷新后不变;换一个账号登录看到的相同。
  • 声明了主色的应用:各处都是它声明的颜色,和改动前一样。
  • 声明了图标图片的应用(HotCRM):各处都是那张图,和改动前一样。
  • 没声明主色的应用里,「新建」这类主要按钮的颜色和改动前一样。
  • 深色主题下色块和图标看得清。
  • PR 正文附首页和下拉菜单改动前后的截图,并说明颜色是怎么从应用名算出来的;launcherTile.ts 里的渐变表删掉或说明为什么留着。

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

维护者同意的是三点:没声明颜色的应用自动分配纯色、各处统一、去掉首页的渐变;以及撞色不处理。下面是协调席补的:

  • 第 2 项用对象那组色板、按接口名算、不写回数据。
  • 第 6 项自动颜色只用在图标上、不改按钮颜色。
  • 第 1 项列出的各处位置。
  • 「不做的」各条。

没有核对的

Reader: domain:ui 车道。ui/packages/app-shell/src/layout/AppMark.tsx、layout/appTileColors.ts、console/home/launcherTile.ts、console/home/HomeAppsStrip.tsx、console/home/AppCard.tsx、layout/AppSwitcher.tsx、layout/PhoneAppHome.tsx;色板在 packages/spec/src/data/object-icon.ts。

Dedupe: 应用 图标 颜色 首页、应用 主色 自动、app tile colour launcher(objectstack,open)→ 都是 0。相关:#36141(对象菜单图标,同一类问题)、objectui#12201(应用只有一个图标,2026-10-12 的裁定)。

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-21T17:26Z):协调席问「这张卡也通知 os-sales 席位派发吗?」,维护者:「通知派发」。

  3. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Claim: PM loop · 2026-11-21T17:40Z · area b1-CX (epic #34571; taken from the mailbox, record 7066493162, the maintainer's 「通知派发」).
    Area: b1-CX
    Session: session_01L6bhgXNXwc6aap2K3v32WF (card thread)
    Account: os-sales
    Branch: claude/project-thread-54ujof
    Seat: repo:objectstack#1
    Domain: domain:ui
    File surface: app-shell layout/appTileColors.ts (one resolver: logo image, then the declared primary colour, then a colour from the app's name), layout/AppMark.tsx, console/home/HomeAppsStrip.tsx and launcherTile.ts (the home tile takes the same branch; the 10-gradient table goes), the tile-grid page block, the ⌘K "switch app" rows; tests; changeset.
    Container & model: M, card thread, model: opus, effort: high
    Clause-②: no (expected: no export or prop change; re-measured on built declarations before push)
    Metadata-protocol: none
    Premise (thread, read on main 146b6f9b, file build-seat1/36157/premise-read.md in the project folder): holds. Twelve places draw an app icon; recents and search results have no app rows, so nothing to do there. Item 6 holds: the button colour comes only from declared branding, and the automatic colour never enters it (pinned by a test). One correction to the card: #7C3AED is HotCRM's expense app; the sales app declares orange #EA580C, so its orange buttons are right.
    Basis: card #36157; epic #34571; the maintainer's 「同意」 to the three points on the card.
    Scope, the seat's reading: palette OBJECT_COLORS without gray (8 colours), drawn with the exported OBJECT_COLOR_TILE_CLASS (white glyph; dark-theme contrast already pinned by #35985). The hash is the repo's simpleHash (signed djb2 plus Math.abs) modulo 8, copied exactly and pinned name-to-colour by a test. Apps with a logo or a declared colour do not change (all HotCRM apps and every repo app with a colour); the blank template app and AI-built apps get a colour. The tile-grid page block and the ⌘K switch-app rows take the same tile (item 1: one icon everywhere). The avatar menu's hidden-apps list and the unmounted AppCard are left alone. This card does not extend to objects: #36141 item 4 is with the maintainer.
    Resume-from: none
    Fold-or-serial: no file overlap with #36141 (PR #36164). #36112 moves the app name into the sidebar and writes a new desktop app menu; both must use AppMark. Whoever lands second merges main. overlap-check.mjs before each push. No declaration L2 while Clause-② stays no; L1 at L1-b. The PR carries Fixes #36157.

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

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: pm:dispatched to seat 1 (as set); rationale: area:ux · Feature · app icons look the same everywhere: an app with no declared colour gets a solid one, the home page drops gradients, the dropdown drops gray tiles; coordinator topic #34571 → p2 as set by the coordinator · size S.

  6. added a commit that references this issue on Nov 22, 2026
    1f11c33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxdomain:uienhancementpm:dispatchedpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions