Skip to content

行内编辑键盘与输入法:回车保存下移、Tab 保存右移、打字即编辑、Esc 取消;拼音选词不误提交 #35687

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

立卡门类别:④ 协调节点的子单,承父单(专题:列表行内编辑重做,维护者直派,见本卡挂靠的父卡)。⛔ 不是认领。优先级 p2。

维护者 2026-11-20 原话:「以上都同意」。对应协调席列出的键盘做法和「Esc 一律取消」。

现状(主干 d96c878e33)

  • 未编辑时:方向键、Home/End 移动焦点格;回车进入编辑;Ctrl+C 复制一格;直接打字没有反应(data-table.tsx:3049-3128)。
  • 编辑时:内置输入框回车提交、Esc 取消、失焦提交;注入的字段控件上,回车只在目标是 <input> 时提交;Tab 故意不离开编辑(4268-4294 的注释)。
  • 输入法:data-table.tsx 和 ui/packages/fields/src/FieldEditWidget.tsx 里没有 isComposing 判断,回车一律当提交(约 3130、4283)。选拼音候选词的那次回车可能把单元格提交掉。这一条是读源码得出的,尚未在浏览器里复现。
  • 实测(本机,20 种字段类型):单击进入编辑后,光标不在编辑框里,焦点停在单元格上,要再点一次才能打字。测试工具的模拟输入不完全可靠,实现时请先复现。

要做的

未编辑、有选中格时:

编辑时:

输入法:

  • 组字过程中的回车、Esc、Tab、方向键都交给输入法,不提交、不取消、不移动。
  • 「打字即编辑」由输入法组字触发时,第一个拼音不能丢,也不能把拼音字母当成值。

不做的

  • 区域多选、多格粘贴、向下填充。

验收

  • 用系统自带拼音输入法:选中一个文本格直接打「zhong」再按回车选词,单元格里是「中」字并仍在编辑;第二次回车保存并留在原格。Chrome 和 Safari 各验一次。
  • 选中数字格打「5」:编辑框里是 5,原值被替换;按 Esc 回到原值。
  • 编辑中按 Tab:保存并选中右边一格;按回车:保存并留在原格。
  • 多行文本里回车换行,Ctrl+回车保存。
  • 选中必填格按退格:值不变,格上提示必填,没有发保存请求。
  • 双击任何可编辑的格后直接打字,字进了编辑框。
  • PR 正文列出迁移和作废的测试(Tab 不离开编辑是之前有意的决定,本卡取代它)。

Reader: domain:ui 车道。ui/packages/components/src/renderers/complex/data-table.tsx(handleCellKeyDown 约 3070-3128、handleEditKeyDown 约 3130-3140、注入编辑器的包装约 4268-4294)、ui/packages/fields/src/FieldEditWidget.tsx。

Dedupe: isComposing、输入法 回车 提交、Tab 行内编辑(objectstack,open)→ 0。

正文最后更新:2026-11-21T13:4xZ(座位 repo:objectstack#1 按 #36023 的裁定 7060745834 和 S4 #36054 改了五句)

Activity

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

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:queue; rationale: area:ux · Feature (keyboard and IME: Enter saves down, Tab saves right, typing edits, Esc cancels, pinyin composition never commits early) · a child of the inline-editing topic #35683 (the maintainer's list-page work) → p2 as the coordinator set it; topic UX Features take p2 under the rules.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgTC8kn7AdeMpMmyhJG

    Claim: PM loop round 1 · area b1-I · 2026-11-20T00:59Z · p2 child of epic #35683 (list inline-edit redo), folded member: one PR with chain head #35684, dispatched to the same os-dev subagent of this area thread
    Session: session_01L6bhgTC8kn7AdeMpMmyhJG
    Account: os-sales
    Branch: claude/issue-35684-inline-edit-select-keys (the fold's shared branch, named for the chain head)
    Worktree: objectstack-issue-35684
    Domain: domain:ui
    Seat: repo:objectstack#1 (area b1-I)
    Area: b1-I
    File surface: the chain head's claim on #35684 (data-table.tsx handleCellKeyDown / handleEditKeyDown / the injected-editor wrapper, FieldEditWidget.tsx composition guard); stop on breach.
    Container & model: L (folded with #35684), mode:subagent, model: default (opus) — dispatch-gates --tier: no path-derived mandate, effort: xhigh (epic child card)
    Clause-②: yes (widening)
    Metadata-protocol: semantic
    Responsibility: n/a — not a defect card
    Thread-read: 7025478393
    Premise: holds — at origin/main d44b5e3: git grep -c isComposing over data-table.tsx and FieldEditWidget.tsx = 0 and 0; the injected editor commits on Enter only when the target is an INPUT and leaves Tab alone (data-table.tsx:4268-4294, the 「Tab is deliberately NOT in that list」 comment this card supersedes). The IME early-commit is still a source reading; the dev reproduces it with a real composition event before fixing it.
    Prior rulings read: epic #35683 points 2, 8 and 11 bind it; card thread: 1 triage first touch (7025478393), no ruling; the full reading is on the chain head's claim.
    Serial constraints cleared: the chain head's claim on #35684 (the full check lives there).

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgTC8kn7AdeMpMmyhJG

    2026-11-20T08:23Z · This card stays open after PR #35747 lands, for one leg only: the Safari pinyin check. By the seat's ruling on the contract review of PR #35747 (record 7034067196, finding S4), the PR names this card Part of #35687, not Fixes, so merging it does not close the card.

    • Delivered by PR feat(list): select a cell with a click, edit with a double-click, Enter or typing; no inline-edit toggle (#35684, #35687) #35747: every other line of 要做的 and 验收, measured in Chromium with a real composition event (composing "zhong", the input method's Enter with keyCode 229 and isComposing: true, then 中): the editor keeps 中 and stays open. Evidence: the PR's Verification section and the seat's evidence folder.
    • Left: 验收 「Chrome 和 Safari 各验一次」, the Safari half. NOT MEASURED: no WebKit build is available in the cloud containers. Safari's post-composition 229 Enter is pinned in jsdom only (data-table-keys-35687.test.tsx).
    • Done when: on Safari (macOS), with the system pinyin input method, typing zhong in a selected text cell of an object list and pressing Enter to pick 中 leaves 中 in the editor, still editing; a second Enter commits and moves down. A one-line result on this card closes it.

    Generated by Claude Code

  7. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgTC8kn7AdeMpMmyhJG

    2026-11-20T10:07Z · PR #35747 merged 811858c6595421c8b7ca1d05f546b0e11e947eec at 2026-11-20T10:05:08Z as Part of #35687. Every line of 要做的 and 验收 is delivered except the Safari half of 「Chrome 和 Safari 各验一次」 (scope: 7034313280). Claim released: pm:dispatched and the assignee removed. The card goes on hold for the Safari check.

    • Why hold and not the queue: a cloud session has no Safari or WebKit build and cannot drive the macOS pinyin input method, so a dispatched developer could not measure it. Source: the seat's ruling 7034328768 on PR feat(list): select a cell with a click, edit with a double-click, Enter or typing; no inline-edit toggle (#35684, #35687) #35747 (finding S4 closed by Part of, the card kept open for this leg). Grade unchanged.
    • What is left (one manual check): on Safari (macOS), with the system pinyin input method, type zhong in a selected text cell of an object list and press Enter to pick 中. The editor must keep 中 and stay open; a second Enter commits and moves down. A one-line result on this card closes it; a failure reopens the work under this card.

    Restart-when: a person or a session with macOS Safari and the system pinyin input method can run the check above


    Generated by Claude Code

  8. added
    pm:on-hold
    and removed
    pm:dispatched
    on Nov 20, 2026
  9. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

    更正,正文已同步。

    维护者 2026-11-20 原话:「选中任意格后按空格,他是进入编辑了,没有你说的规则」。

    「选中某格后按空格打开记录」这一条是协调席自己加的,不是参照产品的行为,也不是维护者的裁决,现在作废:

    • 空格和其他可见字符一样,按「打字即编辑」处理(布尔格仍是切换)。
    • 打开记录只走名称列的文字。
    • 进行中的实现如果已经做了「空格打开记录」,请去掉。

    另:从列表打开记录的方式(整页还是侧边)维护者正在重新讨论,结论会另立卡,本卡不必等。

  10. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Seat note · 2026-11-21T13:44Z · Card text reworded after the maintainer's ruling 7060745834 on #36023 (Enter saves and stays) and #36023 S4 (#36054, armed)

    The body's five sentences now read: Enter saves and stays on the cell; Backspace / Delete clear and save at once, and a required field refuses with a hint; in the pinyin check, the second Enter saves and stays. This supersedes the "a second Enter commits and moves down" wording in the hold comments 7034313280 and 7036801771. The one manual check left on this card is unchanged otherwise: on Safari (macOS), with the system pinyin input method, typing zhong in a selected text cell of an object list and pressing Enter to pick 中 leaves 中 in the editor, still editing; a second Enter saves and stays on the cell. Run it on a build with #36054 in. A one-line result on this card closes it.

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:uienhancementpm:on-holdpriority:p2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions