Skip to content

feat(ui): prefer inline interactions over modals (v1.13) - #37

Merged
argszero merged 1 commit into
mainfrom
feat/ui-inline-over-modal
Aug 17, 2026
Merged

argszero merged 1 commit into
mainfrom
feat/ui-inline-over-modal

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Establish the "prefer inline interactions over modals" UI principle and convert a high-frequency path to inline.

Host feedback: the system should minimize modals/popups — they interrupt the operation flow, occlude context, are worse on mobile, and enable modal-in-modal nesting that is hard to maintain.

Rant reference

Host instruction (rant 2026-08-17T14:34:19, UI 设计原则 — 尽量少用弹窗 / modal):

宿主指出:整个系统尽量少用弹窗和 modal。理由:1. 弹窗用户体验非常差(打断操作流、遮挡上下文、移动端/小屏更糟);2. 可维护性变差——一旦某个功能用了弹窗,后续功能演化可能就会出现"弹窗中的弹窗"嵌套,难以维护。

Changes

  • docs/user-stories.md bumped to v1.13 — new §1.1 UI 约定:尽量少用弹窗:
    • prefer inline interactions (inline expanding forms / collapsible panels / in-place edit)
    • modals only for genuinely focus/blocking actions (e.g. delete confirm); no modal nesting
    • replacement patterns (inline confirm, toast+undo, inline dropdown / standalone page)
    • legacy modal inventory with priorities: P0 listing form + dept add/edit (now inline), P1 topup / raise-request, P2 chat
  • ui/README.md: same principle + modal inventory synced; stale "部门弹层 modal" wording updated
  • ui/index.html + ui/js/app.js: dept add/edit converted from the dept-modal overlay (introduced in Cycle 400) to an inline expanding card (#dept-form-card) in the org pane — same reliable no-prompt interaction, no modal. The listing form (#share-form-card) was already an inline expanding card; confirmed.

Verification

  • grep dept-modal|openDeptModal in ui/ → zero matches; modal-overlay count = 3 (chat/topup/raise, all marked P1/P2 in docs)
  • No modal nesting anywhere
  • node --check ui/js/app.js passes
  • cargo test passes (1 passed)
  • cargo fmt --check passes

Host principle: the system should minimize modals/popups — they interrupt
flow, occlude context, hurt on mobile, and invite modal-in-modal nesting
that is hard to maintain. This change:

- docs/user-stories.md v1.13: new §1.1 "UI 约定:尽量少用弹窗" —
  prefer inline interactions (inline expanding forms, collapsible panels,
  in-place edit); modals only for genuinely focus/blocking actions
  (e.g. delete confirm); no modal nesting; replacement patterns listed;
  legacy modal inventory with P0/P1/P2 refactor priorities
- ui/README.md: same principle + modal inventory synced
- Convert dept add/edit from the dept-modal (introduced Cycle 400 per
  rant 10:59:47) to an inline expanding card (#dept-form-card) in the
  org pane — high-frequency path per the priority list; keeps the
  reliable click response (no window.prompt), just without a modal
- The listing form (#share-form-card) was already an inline expanding
  card; confirmed in docs

Refs: rant 2026-08-17T14:34:19 (UI 设计原则 — 尽量少用弹窗 / modal)
@argszero
argszero merged commit 88af37c into main Aug 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant