Skip to content

表单弹窗:加放大图标,原地展开为整页,与记录抽屉的放大一致 #34604

Closed

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

立卡门类别:④ 协调节点的子单,承父单 #34571(控制台核心业务操作体验专题,维护者直派,「都是p1」)。⛔ 不是认领。
维护者 2026-11-17 原话:「现在新建编辑是弹出窗口,你的建议是改成全屏吗」「展开为整页,现在右侧弹出框已经有放大缩小的图标,可以统一风格。」

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

  • 记录抽屉有放大控件(navigation-overlay.tsx:523 的 maximizedState,i18n 键 detail.maximize 已存在)。ModalForm 没有。
  • 控制台的新建 / 编辑写死 formType: 'modal'(ui/packages/app-shell/src/console/AppContent.tsx 约 :1700–1800);弹窗尺寸推断只到 lg / xl,从不到 full(ModalForm.tsx:502–512)。
  • 整页路由 :objectName/new 存在(AppContent.tsx:174),但 ModalForm 不对外暴露填写中的值,子表行在 MasterDetailForm 内部状态里,没有通道带到整页路由。

要做的

  1. 表单弹窗标题栏加放大 / 还原图标(与记录抽屉同一个图标和位置)。点击后原地把弹窗切到 full 尺寸并放开高度上限;表单保持挂载,已填的值、脏状态、子表行都保留。再点还原。
  2. 两条渲染分支(普通表单与带内嵌子表的分支,后者有自己的 DialogContent,:1189–1193)都要有这个按钮。
  3. 记住用户上次的选择(按对象)。

不做的

  • 不走「跳转到整页路由并搬运草稿」的路(需要新的值通道和子表通道,另议)。

验收

  1. 新建商机弹窗里填了几个字段后点放大,弹窗铺满,已填内容还在;点还原回到原尺寸。
  2. 带行项目的报价单同样可放大,行不丢。

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

图 8 弹窗表单

图 8 弹窗表单

Reader: domain:ui 车道,改 ModalForm.tsx(两条分支)。

Dedupe: repo:objectstack-ai/objectstack ModalForm maximize expand full page dialog → 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_01WGufzgwLiKcfujYUug7sPs

    Claim: PM loop round 2 · 2026-11-17T06:22Z
    Session: session_01WGufzgwLiKcfujYUug7sPs
    Account: os-support-ai
    Branch: claude/issue-34604-modal-form-maximize
    Worktree: objectstack-issue-34604
    Domain: domain:ui
    Seat: repo:objectstack#3
    File surface: ui/packages/plugin-form/src/ModalForm.tsx (both branches: header control, maximized state, size override), a package-internal helper under ui/packages/plugin-form/src/** for the per-object preference, ui/packages/components/src/custom/mobile-dialog-content.tsx only if the full height cap must move there, tests, root .changeset/
    Container & model: M, mode:subagent (area o3-B), model: TIER_DEFAULT (dispatch-gates --tier on ModalForm.tsx: no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 6937244719
    Premise: holds (area premise read at origin/main 8dd8192, re-checked at fecd2e9 for the moved hunks: record drawer maximize in navigation-overlay.tsx maximizedState with lucide Maximize2/Minimize2 in RecordTopBar, keys detail.maximize / detail.restoreSize exist in en, zh-Hans and zh-Hant; ModalForm has no control; effectiveModalSize infers lg/xl only, full = sm:max-w-[95vw]; subform branch has its own MobileDialogContent)
    Serial constraints cleared: #34599 (PR #34657, merged 119c82c8) and #34607 (PR #34645, merged fecd2e95) landed first as queued; overlap-check probe on ModalForm.tsx + mobile-dialog-content.tsx + autoLayout.ts vs origin/main fecd2e95: clean; shares ModalForm.tsx with draft #34642 (#34605, card thread, lease o3-B) and merges cleanly with it; runs alongside #34668 (autoLayout col-span rule, disjoint hunks)
    Pre-claim lane: domain:ui — every path under ui/packages/plugin-form/src/** / ui/packages/components/src/custom/** (area o3-B roots + one shared dialog shell file)
    Pre-claim deps: none open — the card's serial predecessors #34599 and #34607 are merged; no Blocked-by:
    Prior rulings read: modalform,maximize,maximizedstate,fullpage → 0 ADR hits; thread: none; card body quotes the maintainer 「展开为整页,现在右侧弹出框已经有放大缩小的图标,可以统一风格。」 and rules out carrying a draft to :objectName/new. ADR-0035 §6 (hosts suppress their own footer for master-detail) untouched by this card.

    Lease o3-B (seat post #34584); child of epic #34571. Clause-② note: no holds while no new i18n key and no exported prop/type of @object-ui/plugin-form or @object-ui/components is added (labels reuse detail.maximize / detail.restoreSize); otherwise the dev stops and reports.

  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_01WGufzgwLiKcfujYUug7sPs
    os-dev-report

    {
      "issue": 34604,
      "status": "done",
      "branch": "claude/issue-34604-modal-form-maximize",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34703",
      "head": "9b6b5b02646c2173d6e1513db7946872cd8f0ae1",
      "session": "session_01WGufzgwLiKcfujYUug7sPs",
      "premise_still_valid": true,
      "summary": "ModalForm draws the record drawer's maximize/restore switch (RecordTopBarButton, lucide Maximize2/Minimize2 h-3.5, existing keys detail.maximize/detail.restoreSize) just before the close X in both arms (flat and subforms). Maximized, effectiveModalSize is 'full' (so dialogUndeclaredColumns reaches 4 for 16+ undeclared fields) and the height class swaps sm:h-auto sm:max-h-[90vh] for sm:h-[95dvh] sm:max-h-[95dvh]; only classes change, the form subtree stays mounted. The choice is a per-object localStorage preference (modal-form-maximized:OBJECT) in a package-internal helper modalMaximize.ts, try/catch and SSR-safe. Shown from sm up only (phone sheet is already full screen). origin/main b1da9f55 (#34642 section nav) merged in at f85988ac: header keeps sm:pr-20 and drops its border-b when the nav strip draws.",
      "tests": "HEAD 9b6b5b02: vitest packages/plugin-form/src/__tests__/modalMaximize-34604.test.tsx 11/11 passed; vitest packages/plugin-form/ Test Files 236 passed (236), Tests 2636 passed 1 skipped; pnpm --filter @object-ui/plugin-form type-check exit 0 (test file in tsconfig.test.json listFiles). Ablations via scripts/ablation-replace.mjs at ea132c47 (src import, no build on path; restore verified blob==HEAD, git diff HEAD empty): (1) maximized size override disabled: 10/10 red; (2) key remount on the flat content: the 2 flat-arm identity tests red.",
      "gates": "local at 9b6b5b02: dispatch-gates --commands 38 commands, each exit 0; --ran: 38 derived, 38 run, 0 NOT-MEASURED (derived zero, exit codes recorded); ui check:new-line-citations 0 new exit 0; overlap-check exit 0 vs origin/main 77b42a1e (first run at ea132c47: exit 1 vs #34642 only, since merged). CI check-runs at 9b6b5b02: 52 completed, all success or skipped; required: Lint & Repo Gates success, TypeScript Type Check success, Test Core success, Build Core skipped, Governed Surface Queue Guard success, Lint UI success, Type Check UI success, Test UI success, Build & E2E UI success, Live E2E UI success, Dogfood Regression Gate success.",
      "dogfood_battery": "n/a: no ! in the PR title and Clause-2 is a bare no",
      "mcp_calls": "0",
      "api_writes": "3: git push (branch), relay pr_create (POST pulls + POST issues/34703/assignees), this os-dev-report comment via post-stamped.mjs",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: seat. PR body readings name head ea132c47 and the #34642 overlap line, both superseded by the merge at f85988ac and head 9b6b5b02 (this comment carries the current readings); the dev does not PATCH the body"],
      "deviations": ["ui AGENTS.md #2 docs (plugin-form README, content/docs/frontend) not updated: outside the card's file surface, neither page describes dialog chrome", "PR body carries the dispatch-mandated HTML-comment attribution and signed lines, which os-dev bans for dev-written text; the dispatch was followed"],
      "files_changed": [".changeset/34604-modal-form-maximize.md", "ui/packages/plugin-form/src/ModalForm.tsx", "ui/packages/plugin-form/src/modalMaximize.ts", "ui/packages/plugin-form/src/__tests__/modalMaximize-34604.test.tsx"]
    }
  7. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Delivered · 2026-11-17T08:36Z

  8. 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