refactor(ui): align detail popups with the documented property hierarchy - #767
Draft
tiankaima wants to merge 5 commits into
Draft
refactor(ui): align detail popups with the documented property hierarchy#767tiankaima wants to merge 5 commits into
tiankaima wants to merge 5 commits into
Conversation
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
life-ustc | 2a525e0 | Aug 08 2026, 04:07 PM |
|
E2E HTML report is ready: https://life-ustc.github.io/e2e-snapshot-artifacts/reports/31266138157/index.html |
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Make the homework and todo detail popups follow the layout and property hierarchy already documented in
docs/contracts/, and fix the close control that rendered its accessible label as visible text next to the X icon.What the documentation requires
docs/contracts/homework.json— both homework popups specify the order description, due summary, vertical metadata excluding platformcreatedAt, action controls, discussion, with discussion to the right of the details on desktop.docs/contracts/_ui.json"Model Property Priority" — the due time, completion status and primary action state are primary; course/semester/short metadata are secondary; raw timestamps and repeated parent objects are tertiary and must be de-emphasized.docs/contracts/homework.jsoncompact-card-list-surface— standard/default homework never gets a badge of its own.docs/contracts/_ui.json"Layout Principles" — reading-first content in the main column, structured facts alongside it, stacked in the same order on mobile.Changed Surfaces
src/lib/components/DetailDialog.svelte— shared popup shell: header with title and an optional subtitle, scrollable body, optional discussion column on the right that stacks below on mobile. No pinned footer, because the documented order keeps action controls inside the details stream.src/features/homeworks/lib/homework-detail-meta.ts— pure builders for the due summary (due date, completion status, relative label), the vertical metadata rows (publication date and submission opening only; due date and platformcreatedAtexcluded) and the attribute chips.src/features/homeworks/components/HomeworkDueSummary.svelte,HomeworkMetaList.svelte,HomeworkDetailTags.svelte— renderers giving the due date primary weight and the raw timestamps compact muted rows.sectionHomeworkStatusremoved: the section popup was labelling incomplete homework with the "standard homework" tag as if it were a status. Completion status now uses the existingcompletedLabel/filterIncompletecopy in both locales.headingtoCommentsPanelso the discussion heading matches catalog and section pages.aria-label, no visible label text.Evidence
Local Postgres was installed and seeded so the browser-backed suites could actually run.
bunx svelte-check --tsconfig ./tsconfig.json— 0 errors (13 pre-existing warnings in unrelated files)bunx tsc --noEmitfor all three typecheck configs — passbunx biome check— passbunx vitest run— 326 files, 2034 tests passbun run openapi:check, GraphQL SDL snapshot,bunx wrangler types --check,bun run build— passsections/[jwId],dashboard/**andcomments/**— 118 tests pass, covering the new popup specs plus the existing homework CRUD, completion, comment and permalink flowstests/e2e/utils/detail-dialog.tsasserts the documented order directly: the due summary must render above the metadata list, the metadata list must not repeat the due date or expose a creation timestamp, action controls must live in the details column, and the close control must expose an accessible name with no visible text. Unit tests cover the builders, including that standard homework produces no chip.Section homework popup and workspace homework popup:
Section homework detail popup
Workspace homework detail popup
Todo popup and mobile stacking:
Todo detail popup
Section homework popup on a 390px viewport
Docs / Contracts
No contract changes: this brings the UI in line with the existing
homework.jsonand_ui.jsonspecifications. No new copy — the completion-status labels already existed in both locales.dueLabelandfilterIncompletewere added to copy types for messages that already shipped.Risk Areas
The section popup is shared by read, edit, completion, delete, audit-history and comment flows; permissions and handlers are unchanged and those flows are covered by the passing E2E suites. Removing
sectionHomeworkStatusalso removed its plumbing through the section dialog chain.Cleanup
Temporary preview routes and servers were removed; no generated files were hand-edited.
To show artifacts inline, enable in settings.