Skip to content

分组表单:加分组导航,点一下滚到对应分组,并标出还有必填未填的分组 #34605

Closed

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

立卡门类别:④ 协调节点的子单,承父单 #34571(控制台核心业务操作体验专题,维护者直派,「都是p1」)。⛔ 不是认领。
维护者 2026-11-17 原话:「弹出录入的表单目前是用的tab,不方便滚动,是否建议换成分组模式」

现状(读码,objectstack origin/main ed45eb9;界面实测在 staging os-4e4qa4 与 hotcrm 本地实例)

要做的

  1. 给每个分组行一个稳定的 DOM 标识。
  2. 新增分组导航组件:弹窗里放在标题与滚动区之间,整页表单放在分组布局上方;点分组名滚到该分组,滚动时高亮当前分组。
  3. 有校验错误或必填未填的分组,在导航上带计数。
  4. 只在可见分组不少于 2 个、且不是页签布局时显示;被 visibleWhen 隐藏的分组不出现,折叠的分组点击时先展开。
  5. 不需要作者配置,默认开启。

不做的

  • 不改页签布局与向导布局。

验收

  1. 一个 4 个分组的表单,弹窗标题下有 4 个分组名,点第 3 个滚到第 3 个分组。
  2. 第 2 个分组有必填未填,提交后导航上该分组带「1」。
  3. 只有 1 个分组时不显示导航。

设计图(静态示意稿,标「新」的是改动;字段和文案以实际元数据为准)

图 7 宽屏复杂表单

图 7 宽屏复杂表单

图 8 弹窗表单

图 8 弹窗表单

Reader: domain:ui 车道,新组件放 ui/packages/plugin-form,接入 ModalForm.tsx 与 ObjectForm.tsx。

Dedupe: repo:objectstack-ai/objectstack form section anchor navigation scrollspy simple form → 0。

Activity

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

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → pm:queue · 2026-11-17T03:29Z

    ⛔ Not a claim.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

    Claim: PM loop round 1 · 2026-11-17T03:36Z
    Session: session_01WGufzgh1zkZzDXL36ckWAG
    Thread session: session_01WGufzgTZ8JB6JZFffVhT7R
    Account: os-support-ai
    Branch: claude/project-thread-a9r6j4 (card-thread pinned branch: the harness lets the thread push only this name)
    Worktree: objectstack-issue-34605
    Domain: domain:ui
    Seat: repo:objectstack#3
    File surface: ui/packages/components/src/renderers/form/** (section-report context), ui/packages/components/src/index.ts (one export line), ui/packages/plugin-form/src/** (nav component, ModalForm and ObjectForm mounts), ui/packages/i18n/src/locales/* (new keys only), root .changeset/
    Container & model: L, mode:thread (large card; hands its head back to area o3-B), model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: yes (widening — one @object-ui/components export + new @object-ui/i18n locale keys; no FormSchema or spec key)
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 6937255202
    Premise: holds (o3-B premise read, /mnt/project-files/objectstack-seat3/o3-B/premise-2026-11-17.md: size L); footer missing-required hint out of scope (not in the acceptance)
    Serial constraints cleared: ModalForm.tsx shared with o3-B serial chain #34599 → #34604 → #34607: overlap-check before each push, merge main after whichever lands first

    Lease o3-B (seat post #34584); child of epic #34571.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgTZ8JB6JZFffVhT7R
    os-dev-report

    Stamp: 2026-11-17T04:42Z

    {
      "issue": 34605,
      "status": "done",
      "branch": "claude/project-thread-a9r6j4",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34642",
      "head": "3e9036363ca17068d84c6420e77db3adb8918205",
      "session": "session_01WGufzgTZ8JB6JZFffVhT7R",
      "premise_still_valid": true,
      "summary": "A stacked sectioned form now shows a section navigation strip: in the record dialog (ModalForm) between the title and the scrolling body, on the full-page form (ObjectForm) above the sections, sticky. A click scrolls to the section (unfolding a collapsed one first), the entry in view is highlighted while scrolling, and after a refused submit each entry shows the count of its fields with errors. The form renderer reports the headings it draws (each heading row now has a stable id and data-form-section) through a new FormSectionNavContext sink; the strip draws only with two or more visible sections, leaves out sections hidden by visibleWhen, and never draws in the tabbed layout. No author config.",
      "tests": "New: packages/plugin-form/src/FormSectionNav.test.tsx (7: acceptance 1-3, visibleWhen, collapsed unfold, tabbed none, ObjectForm) and packages/components/src/renderers/form/__tests__/form-section-nav-34605.test.tsx (7). On the final head 3e903636, under os-verify-lock: pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-form/ packages/components/src/renderers/form/ packages/i18n/ packages/app-shell/src/views/studio-design/DataPillar.formViewLayout-30057.test.tsx -> 'Test Files 424 passed (424)', 'Tests 5113 passed | 31 skipped (5144)', VERDICT command-exit 0. Type-check components / plugin-form / i18n: VERDICT exit 0; eslint on touched files: 0 errors. Ablations via scripts/ablation-replace.mjs (restored, git diff HEAD empty): drawn-node check dropped -> 2 red; error count dropped -> 2 red; sink (not null) provided to descendants -> nested-form test red. Browser (Playwright, Chromium 1280x800 and 375px, throwaway probe page on the console Vite server, not committed): five entries under the dialog title; click on the third lands its heading 8px below the scroller top; scroll spy follows; collapsed section unfolds 0 -> 4 fields; refused submit shows '· 1' on Forecast and clears when filled; no page overflow at 375px.",
      "gates": "node scripts/pm/dispatch-gates.mjs --commands derived 40 on 8243a62a (26 paths vs merge base 31096af83); every one run, 39 exit 0, check:test-source-alias exit 1 (the new components test reached @object-ui/react-runtime through a dynamic import), fixed by a module-top import in 3e903636 and re-run exit 0; --ran: '40 derived, 40 run, 0 NOT-MEASURED, 0 UNRUN'. overlap-check on 3e903636: 'VERDICT clean' exit 0. check-governed-merges --branch HEAD: 0 of 26 paths hit the register, NOT governed, +867/-24. CI on the PR: running at the time of this comment.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "deviations": [
        "Surface widened, seat-approved: ui/packages/components/src/index.ts (one export line, Clause-② yes widening, recorded in Claim 6937400927) and ui/packages/app-shell/src/views/studio-design/DataPillar.formViewLayout-30057.test.tsx (test-only scoping)",
        "Footer missing-required hint not implemented: the card's acceptance does not include it, seat agreed; triage comment 6937255202 says the card carries it, so it may need a follow-up card",
        "Six existing tests read a section name with unscoped getByText, which now finds two matches (the strip repeats names); each scoped to the form, test-only",
        "The Studio form-view Preview renders the runtime dialog, so it now shows the strip too; intended (the preview mirrors the runtime form), noted in the PR body",
        "No reviewer requested, per the order; the PR stays draft",
        "One react-refresh/only-export-components warning for the useFormSectionNav hook exported beside the component"
      ],
      "files_changed": [
        ".changeset/34605-form-section-nav.md",
        "ui/packages/app-shell/src/views/studio-design/DataPillar.formViewLayout-30057.test.tsx",
        "ui/packages/components/src/index.ts",
        "ui/packages/components/src/renderers/form/__tests__/form-section-nav-34605.test.tsx",
        "ui/packages/components/src/renderers/form/form.tsx",
        "ui/packages/components/src/renderers/form/section-nav-context.ts",
        "ui/packages/i18n/src/locales/{ar,de,en,es,fr,ja,ko,pt-BR,ru,zh-Hans,zh-Hant}.ts",
        "ui/packages/plugin-form/src/FormSectionNav.test.tsx",
        "ui/packages/plugin-form/src/FormSectionNav.tsx",
        "ui/packages/plugin-form/src/ModalForm.tsx",
        "ui/packages/plugin-form/src/ObjectForm.test.tsx",
        "ui/packages/plugin-form/src/ObjectForm.tsx",
        "ui/packages/plugin-form/src/__tests__/formViewTabKeysAndButtons-26843.test.tsx",
        "ui/packages/plugin-form/src/__tests__/sectionLabelI18n.test.tsx",
        "ui/packages/plugin-form/src/__tests__/sectionVisibleWhen-6111.test.tsx",
        "ui/packages/plugin-form/src/sectionedFormValues.test.tsx"
      ],
      "mcp_calls": "0",
      "api_writes": "git pushes to claude/project-thread-a9r6j4; 1 relay pr_create via scripts/pm/fleet-write/dispatch.mjs (run 44018833733, read-back identical, 12038 bytes); 1 comment via scripts/pm/post-stamped.mjs (this one)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  7. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

    Claim amendment · 2026-11-17T05:09Z

    File surface (claim 6937400927) adds ui/packages/app-shell/src/views/studio-design/DataPillar.formViewLayout-30057.test.tsx: test-only (+4/−1), the Studio form-view layout test re-scoped to the new section navigation. Seat-approved during development; recorded here per L1-a REWORK 6939117084.

    Clause-②: unchanged (yes, widening: @object-ui/components FormSectionNavContext + FormSectionNavItem/FormSectionNavSink types, plus i18n keys); L2 by the seat.
    Metadata-protocol: none

  8. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs

    Delivered · 2026-11-17T07:29Z

    • PR feat(plugin-form): section navigation for stacked sectioned forms #34642 merged (merge commit b1da9f55db0f4028cd6720fae7e80c6574e7dc67); card closed by Fixes. L1 delta ACCEPT 6941223736, Contract review PASS 6941274937, landing 6941290328.
    • Delivered: section navigation strip for grouped forms in the dialog and full-page hosts, click-to-scroll with active highlight, error/required counts per section, hidden when fewer than two visible sections or in tabbed/wizard layouts; new @object-ui/components exports FormSectionNavContext, FormSectionNavItem, FormSectionNavSink; i18n keys form.sectionNav, form.sectionNavErrors in all 11 locales.
    • Left to others: the footer missing-required hint went to the epic's filer as a note (seat).
    • State: pm:dispatched removed (card closed).
  9. removed
    pm:dispatched
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:uipriority:p1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions