Skip to content

refactor(ui): use a single-column detail popup - #767

Draft
tiankaima wants to merge 13 commits into
mainfrom
cursor/fix-dialog-close-ui-0da7
Draft

refactor(ui): use a single-column detail popup#767
tiankaima wants to merge 13 commits into
mainfrom
cursor/fix-dialog-close-ui-0da7

Conversation

@tiankaima

@tiankaima tiankaima commented Aug 8, 2026

Copy link
Copy Markdown
Member

Goal

Keep the homework/todo detail popups as a comfortable overlay (not a miniature two-column page), with an icon-only close control, and stay current with main.

Layout

Page two-column rules still apply on catalog/section pages. Overlays do not.

The overlay now uses one primary fact, one secondary line, then a table:

Primary: due datetime (large)
Secondary: relative urgency (已逾期 … / 还剩 …)

Table (everything else):

  • Homework: status (plus major/team as plain text when present), submission opens, published
  • Todo: priority, status

Then description/content, then discussion. Completion / edit / delete stay in the footer.

There is no chip row, status side column, or collapsible “更多信息” in the dialog body. Close is an X with aria-label only.

Changed Surfaces

  • Merged latest main (including the extracted homework dialog and shadcn dialog updates)
  • docs/contracts/_ui.json / homework.json / todo.json — overlay facts: due, relative urgency, then a table
  • Shared dialog close button — icon + aria-label, no sr-only label text
  • tests/e2e/utils/detail-dialog.ts — table of remaining facts, reading width, icon-only close
  • Homework tags asserted on the facts table; todo detail asserts the due-summary test id

Evidence

  • bunx svelte-check --tsconfig ./tsconfig.json — 0 errors
  • bunx biome check on touched files — pass
  • Browser: signed in as Debug User (Dev). Opened homework 迭代二系统设计评审 on /catalog/sections/9902001 and workspace homeworks; opened todos 期末报告提交 / 补交报告方案确认. Confirmed due + relative line + table, no chips, no body collapsible.

Docs / Contracts

_ui.json Layout Principles: overlays lead with due datetime and relative urgency, then list remaining facts in a table, then reading, then discussion.

Risk Areas

The section popup still hosts edit, completion, delete, audit history, and comments. Those handlers come from main; E2E covers the popup layout on top of them.

Cleanup

Removed the superseded dashboard-local dialog pieces (DetailDialog.svelte, homework-detail-meta, etc.) in favor of main’s shared homework dialog. Screenshot PNGs were removed from the branch (including history) and are not stored in the repo.

Open in Web Open in Cursor 

Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 8, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
life-ustc feded7f Aug 28 2026, 01:35 PM

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
@cursor cursor Bot changed the title fix(ui): prevent visible close labels in dialogs refactor(ui): redesign homework detail dialog Aug 8, 2026
cursoragent and others added 2 commits August 8, 2026 14:22
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
@cursor cursor Bot changed the title refactor(ui): redesign homework detail dialog refactor(ui): rebuild detail dialogs on a shared shell Aug 8, 2026
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
@cursor cursor Bot changed the title refactor(ui): rebuild detail dialogs on a shared shell refactor(ui): align detail popups with the documented property hierarchy Aug 8, 2026
@tiankaima-copilot tiankaima-copilot added kind: refactor Kind: refactor area: ui Area: ui labels Aug 28, 2026
Keep page side rails on pages. Detail popups now use one scrollable reading
column with the title in a sticky header and discussion full-width after
the details, instead of a desktop two-column overlay.

Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
@cursor cursor Bot changed the title refactor(ui): align detail popups with the documented property hierarchy refactor(ui): use a single-column detail popup Aug 28, 2026
cursoragent and others added 2 commits August 28, 2026 07:36
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Adopt main's shared homework detail dialog. Keep the icon-only close
control and the single-column popup contracts, and drop the superseded
dashboard-local dialog pieces.

Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
cursor Bot pushed a commit that referenced this pull request Aug 28, 2026
GitHub cannot render Cursor-local artifact paths, so these PNGs are
committed for inline before/after images in #767.

Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
@cursor
cursor Bot force-pushed the cursor/fix-dialog-close-ui-0da7 branch from 9e48e96 to 0d7cb0c Compare August 28, 2026 11:10
cursoragent and others added 5 commits August 28, 2026 11:14
Keep overlay cards as one reading column: datetime and relative
urgency first, then compact status/tag chips. Move homework tags
off the more-details trigger, and drop the status side column.

Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
The dialog's sr-only description also includes the localized priority,
so scanning the whole dialog text matched Medium twice.

Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
The catalog group label still animates margin for 200ms after icon mode
starts, so an early Courses click can land on Sections instead.

Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Homework and todo popups keep one primary fact (due datetime) and one
secondary line (relative urgency). Status, tags, priority, and other
dates go in a table instead of chips or a collapsible.

Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Area: ui kind: refactor Kind: refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants