Skip to content

视图切换和新建重做:下拉带类型图标和记录数,原地新建(名称、类型、分组字段),不再让用户填机器名 #35553

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

立卡门类别:④ 协调节点的子单,承父单 #35547(专题:列表页重做,维护者直派)。⛔ 不是认领。

维护者 2026-11-19 原话:「涉及到很多细节了,我们之前做的都不好,包括 过滤 排序,选项的设置过程,视图创建和自定义的过程。」「你看一下他列表视图有图标代表类型,还有记录数显示在下拉左侧」。

参照(Twenty)

参照 1:视图下拉,末尾「添加视图」

参照 2:原地新建,四个控件

我们现在

现状 1:视图下拉

现状 2:整屏的创建视图对话框

参照对象是 Twenty(AGPL,本机运行的 f9056c83):只参照结构、步骤和尺寸,⛔ 不抄它的代码。截图 800×500,取自 1280×800 视口;「我们」的截图取自本机最新控制台(origin/main 7ece0204a6,HotCRM,zh-CN),2026-11-19。

现状(实测环境:本机控制台 origin/main 7ece0204a6 + HotCRM,zh-CN,视口 1280×800,2026-11-19,销售应用「商机 / 进行中商机」。)

  • 视图下拉:搜索框、「全部」分组下 9 个视图(已带类型图标),底部「另存为我的视图」「新建视图」「管理视图」。有的视图名被截断(「⚠️ 停滞商机 · 按阶段停留时…」)。
  • 点「新建视图」:弹出整屏对话框「创建视图」,10 张类型卡片(表格、看板、日历、画廊、时间线、甘特图、地图、图表、树形、工时表),下面「标题」和「名称」两个必填项;「名称」是机器标识,自动生成成「biaoge_1」,说明文字写着「机器标识(snake_case)」。
  • 新建的是共享视图,存为草稿(ui/packages/app-shell/src/views/objectViewViewCrud.tsx:170),之后跳到草稿预览。
  • 视图栏上当前视图名旁没有记录数。

要做的

  1. 视图栏上的触发处:类型图标、视图名、记录数、下拉箭头(位置由子卡 1 提供)。
  2. 下拉:保留搜索;每个视图一行,带类型图标;「我的视图」和共享视图分两组;名称过长时换行或给出完整提示,不截成看不出区别的样子。底部「添加视图」。
  3. 原地新建:点「添加视图」,下拉原地换成一张小卡片:图标加名称、视图类型(下拉,带图标)、该类型必需的一个字段(看板选分组字段,日历选日期字段,其余类型没有就不显示)、「创建」。创建后直接进入新视图。
  4. 不让用户填机器名:机器标识由系统根据名称生成并保证唯一,不出现在界面上。
  5. 从当前状态新建:当前有未保存的筛选或排序时,新视图默认带上它们,卡片上写明「包含当前的筛选和排序」,可取消勾选。
  6. 默认建成「我的视图」;有权限的人可在卡片上切到「共享」。「另存为我的视图」并进这张卡片,不再是下拉里的单独一项。
  7. 管理视图(重命名、删除、置顶、设为默认、排序)保留在下拉底部的「管理视图」里,本卡不重做其内容,只保证入口还在。

不做的

  • 不改共享视图的草稿/发布规则和权限(另议)。
  • 不减少视图类型;不改各类型视图自身的内容区。

验收

  • 新建一个按「阶段」分组的看板视图:从点视图名到进入新视图,不超过 5 次点击加一次输入名称;全程看不到 snake_case 或机器标识。
  • 没有改共享视图权限的普通成员也能新建,建出来的是「我的视图」,别人看不到。
  • 带着未保存的筛选新建时,新视图里有同样的筛选标签。
  • 下拉里每个视图有类型图标;当前视图名旁显示记录数。
  • 两个名称前 12 个字相同的视图,在下拉里能分清。
  • PR 正文列出迁移和作废的测试、同笔修改的验收条款(含 records-forms.saved-view-management)。

Reader: domain:ui 车道。ui/packages/app-shell/src/views/objectViewTitleSwitcher.tsx、objectViewViewCrud.tsx、ObjectView.tsx(CreateViewDialog)、personalViews.ts。依赖子卡 1。

Dedupe: 创建视图 对话框 名称、create view dialog machine name(objectstack,open)→ 0。

Activity

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

    Blocked-by: #35548
    Epic #35547 order (seat 5, area:ux): starts when #35548 lands.

  3. added
    pm:blocked
    on Nov 19, 2026
  4. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:blocked; rationale: area:ux · Feature, a child of topic #35547 (the list-page redo the maintainer ordered: 「这个要重新立专题了」) → p1 as the maintainer set it.

  5. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me

    Claim: area ux-3 of repo:objectstack#5, p1, epic #35547 sub-cards 4 and 5 folded into one branch and one PR: #35551 (options as a menu) + #35553 (view switcher and in-place create). The maintainer, verbatim, 2026-11-19T17:02Z: 「你可以协调分工啊 列表页重做的子卡很多啊」 and 2026-11-19T17:01Z: 「能合并处理的卡尽量合并处理对吧」; split by seat 5 · 2026-11-19T17:05Z
    Blocked-by: #35548
    Session: session_01Utp6CZiaBg6rk7dpy1s9Me
    Account: os-bill
    Branch: claude/issue-35551-35553-list-options-view-create
    Worktree: objectstack-issue-35551 (os-dev worktree in the ux-3 container)
    Domain: domain:ui
    Seat: repo:objectstack#5
    Area: ux-3
    File surface: #35551: ui/packages/plugin-list/src/components/ViewSettingsPopover.tsx (panel contents; the trigger stays with #35548), ui/packages/app-shell/src/context/ListPreferencesProvider.tsx (read/write of the existing preference keys only; the storage shape does not change). #35553: ui/packages/plugin-list/src/ViewSwitcher.tsx, ui/packages/plugin-view/src/ViewSwitcher.tsx, ui/packages/app-shell/src/views/{objectViewViewCrud.tsx,CreateViewDialog.tsx,personalViews.ts}, and objectViewTitleSwitcher.tsx only after #35548 lands (it holds that file). Both: new i18n keys only in ui/packages/i18n/src/locales/*.ts, docs/qa/platform-checklist/areas/*.json list-page items (incl. records-forms.saved-view-management), their tests, new e2e specs under ui/e2e/ named for the cards, root .changeset/. ⛔ ui/packages/app-shell/src/views/ObjectView.tsx and the other ux-2 boot files, ui/packages/types/**: stop and report first (the area sends Notify: serial through the seat). ⛔ Any field picker shared with ux-1's #35549/#35550 goes through seat 5 first. Stop on any other breach and report.
    Container & model: L, mode:subagent, model: default, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card (maintainer-ordered redesign, epic #35547 sub-cards 4 and 5)
    Thread-read: 7014425659
    Premise: holds at origin/main 97f342037d by source: the options panel is one stacked popover (ViewSettingsPopover.tsx); new views go through the full-screen CreateViewDialog.tsx with a snake_case name field and are saved as shared drafts (objectViewViewCrud.tsx). The dev re-measures in the browser before code.
    Serial constraints cleared: #35548 (ux-4) holds objectViewTitleSwitcher.tsx, ListView.tsx and the ViewSettingsPopover.tsx trigger; code starts from main on its claim amendments, ⛔ no push until #35548 merges, then merge main and run overlap-check. ux-1's #35549/#35550 hold the filter and sort pickers; no shared file named yet.
    Pre-claim lane: ui/packages/plugin-list/**, ui/packages/plugin-view/**, ui/packages/app-shell/** → domain:ui, area ux-3 (seat 5's split of epic #35547).
    Pre-claim deps: #35548 (Blocked-by above).
    Prior rulings read: check-prior-rulings.mjs --card 35553 --terms view,switcher,create,dialog,personal,options,density,hidden,fields --paths over the surface at 97f342037d: no ruling on either card's thread; ADR-0098 §6 binds the field list (only fields the reader can read); #34603 (count beside the view name removed) is restored by #35548 on the maintainer's later word, not here. Shared-view draft/publish rules and permissions unchanged (the card's 不做的).

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me

    Claim amendment · 2026-11-19T18:31Z
    Blocked-by: #35548
    This card is folded with #35551 on one branch; the shared file-surface amendment is on #35551. Round 1 is committed locally (no push until #35548 merges): the dropdown body with type icons, 我的视图 and shared groups, wrapped long names, 添加视图 and 管理视图, and the in-place create card (name, type, the one field the type needs, 包含当前的筛选和排序, personal by default, shared only for those allowed), with the machine key generated and never asked for.

  8. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me

    Close-out 2026-11-20T00:58Z: PR #35646 MERGED as 238661f47f; Fixes closed this card together with its folded sibling (#35551 list-options popover and #35553 view creation shipped in one branch, per the maintainer's 「能合并处理的卡尽量合并处理」). Reviews: L1-a ACCEPT, seat hand-off to approvers 7024819030; the Test UI ratchet false positive was fixed on the branch (PR comment 7022799069). pm:dispatched off.

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

Metadata

Metadata

Assignees

Labels

area:uxdomain:uienhancementpriority:p1

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions