首次提交
Azure Static Web Apps CI/CD / Close Pull Request Job (push) Skipped
Build and Deploy / build (push) Failing after 9m48s
Azure Static Web Apps CI/CD / Build and Deploy Job (push) Failing after 9m50s

This commit is contained in:
2026-10-24 01:29:24 +08:00
parent e70d46436c
commit c7fdc11dbd
146 changed files with 9750 additions and 5578 deletions
@@ -0,0 +1,10 @@
- [x] Announcement Settings Dialog Markdown toolbar wraps correctly
- [x] Announcement Settings Dialog Preview works
- [x] Announcement Widget is hidden when no announcements exist
- [x] Clicking Announcement Widget opens detail popup
- [x] "Self Correction" tag in Homework Grid is Green
- [x] "Add Item" button in Homework Edit Dialog is White and distinct
- [x] Metadata buttons in Homework Edit Dialog match Preset chips size/shape
- [x] Refresh button in Floating Toolbar does not stick in loading state
- [x] "Save Success" green notification appears after saving Homework
- [x] "Save Success" green notification appears after saving Announcement
+55
View File
@@ -0,0 +1,55 @@
# UI and Functional Improvements Spec
## Why
User reported several UI inconsistencies, visual bugs, and missing feedback mechanisms that affect the usability and aesthetic quality of the application. Specifically, the announcement feature needs polish, font colors need adjustment for dark mode, and feedback for save operations is missing.
## What Changes
### Announcement Feature
- **Settings Dialog (`AnnouncementSettingsDialog.vue`)**:
- Fix Markdown toolbar layout to prevent conflicts/overflow (use `flex-wrap`).
- Fix Preview functionality (ensure `parseMarkdown` works).
- Add "Save Success" feedback when adding/modifying announcements.
- **Widget (`AnnouncementWidget.vue`)**:
- **Hide the widget completely** when there are no active/upcoming announcements (User requirement: "only shows when there are announcements").
- Make the widget clickable to open a detail popup of the current announcement.
- **Detail Popup (`AnnouncementOverlay.vue` or new)**:
- Ensure manually clicking the widget opens the detail view.
### Homework UI
- **Homework Grid (`HomeworkGrid.vue`)**:
- Change "Self Correction" (自批) tag color from Orange/Warning to **Green/Success**.
- **Homework Edit Dialog (`HomeworkEditDialog.vue`)**:
- **Add Item Button**: Change style to be more obvious (White background, black text).
- **Metadata Buttons** (Submission Time, Self Correction): Adjust height and border-radius to match the "Preset" chips on the left for visual consistency.
### General UI
- **Font Colors**:
- Change gray text to **White** in key locations (e.g., Homework Edit dialog controls, Announcement widget text) for better contrast in dark mode.
- **Floating Toolbar**:
- Fix the "Refresh" button loading state (it appears stuck).
- **Feedback**:
- Implement a "Save Success" (green) notification (Snackbar/Toast) that triggers after successful save operations (Homework save, Announcement save, etc.).
## Impact
- **Affected Components**: `AnnouncementSettingsDialog`, `AnnouncementWidget`, `HomeworkGrid`, `HomeworkEditDialog`, `FloatingToolbar`, `index.vue`.
- **User Experience**: Improved visual consistency, better feedback on actions, and cleaner interface when no announcements are present.
## ADDED Requirements
### Requirement: Save Feedback
The system SHALL display a green "Save Success" notification (Snackbar) when:
- A homework entry is saved (auto-save or manual).
- An announcement is added or modified.
- Attendance is saved.
### Requirement: Announcement Widget Behavior
- **WHEN** there are no active announcements, **THEN** the widget on the main board SHALL be hidden.
- **WHEN** the widget is visible and clicked, **THEN** it SHALL open the announcement detail popup.
## MODIFIED Requirements
### Requirement: Visual Styles
- **Self Correction Tag**: SHALL be Green.
- **Add Item Button**: SHALL be White (filled).
- **Metadata Buttons**: SHALL match Preset Chips in size and shape.
- **Refresh Button**: SHALL NOT show loading state indefinitely.
+27
View File
@@ -0,0 +1,27 @@
# Tasks
- [x] Task 1: Update Announcement System
- [x] SubTask 1.1: Fix `AnnouncementSettingsDialog.vue`:
- Fix Markdown toolbar layout (flex-wrap).
- Ensure Preview works (check `parseMarkdown` usage).
- Add "Save Success" notification trigger on save.
- [x] SubTask 1.2: Update `AnnouncementWidget.vue`:
- Add logic to hide component if `notifications` is empty.
- Add click handler to open detail popup (emit event or call method).
- [x] SubTask 1.3: Update `index.vue` to handle widget click and show detail popup.
- [x] Task 2: Update Homework UI
- [x] SubTask 2.1: Update `HomeworkGrid.vue`:
- Change "Self Correction" chip color to `success`.
- [x] SubTask 2.2: Update `HomeworkEditDialog.vue`:
- Style "Add Item" button (color="white", variant="flat").
- Style "Submission Time" and "Self Correction" buttons to match `v-chip` style (height, rounded).
- Ensure text colors are white where appropriate.
- [x] Task 3: Fix General UI & Feedback
- [x] SubTask 3.1: Fix `FloatingToolbar.vue` refresh button loading state (debug `loading` prop).
- [x] SubTask 3.2: Implement Global "Save Success" Snackbar in `index.vue` and expose method/event to trigger it from child components.
- [x] SubTask 3.3: specific font color adjustments (Grey to White) in `AttendanceSidebar` and `HomeworkGrid` as requested.
# Task Dependencies
- Task 3.2 (Global Snackbar) should be done before Task 1.1 and 1.3 to ensure feedback works.