From a165acf072824055e20a6c3cfce4c6dbe8e4f926 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 19 Oct 2026 21:28:36 +0000 Subject: [PATCH] fix(desktop-ui): group event form logistics like web FormCard Co-authored-by: Tyler Dane --- .../EventForm/EventFormAttendeesSection.swift | 7 --- .../EventFormConferenceSection.swift | 9 +--- .../EventForm/EventFormLocationField.swift | 1 - .../CompassUI/EventForm/EventFormView.swift | 50 +++++++++++-------- docs/features/desktop-web-parity-checklist.md | 2 + 5 files changed, 32 insertions(+), 37 deletions(-) diff --git a/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormAttendeesSection.swift b/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormAttendeesSection.swift index 50a64967a..669d4d0cb 100644 --- a/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormAttendeesSection.swift +++ b/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormAttendeesSection.swift @@ -61,13 +61,6 @@ struct EventFormAttendeesSection: View { EnableContactSuggestionsNudgeView(model: model) } } - .padding(12) - .background(theme.surfacePanelColor) - .clipShape(RoundedRectangle(cornerRadius: 8)) - .overlay( - RoundedRectangle(cornerRadius: 8) - .stroke(focusField == .attendees ? theme.accentColor : theme.borderColor, lineWidth: 1) - ) .accessibilityIdentifier("compass-event-form-attendees") .pageJumpChipAnchor(id: "form-attendees") .onChange(of: focusField) { _, field in diff --git a/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormConferenceSection.swift b/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormConferenceSection.swift index 8f4cfed8c..a29fcb969 100644 --- a/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormConferenceSection.swift +++ b/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormConferenceSection.swift @@ -20,16 +20,9 @@ struct EventFormConferenceSection: View { ) { Text("Add \(CalendarCapabilities.conferenceKindLabel(kind))") .font(.rubik(13)) - .foregroundStyle(theme.textColor) + .foregroundStyle(theme.textMutedColor) } .toggleStyle(.switch) - .padding(12) - .background(theme.surfacePanelColor) - .clipShape(RoundedRectangle(cornerRadius: 8)) - .overlay( - RoundedRectangle(cornerRadius: 8) - .stroke(focusField == .conference ? theme.accentColor : theme.borderColor, lineWidth: 1) - ) .accessibilityIdentifier("compass-event-form-conference") .pageJumpChipAnchor(id: "form-conference") } diff --git a/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormLocationField.swift b/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormLocationField.swift index d2b4d8495..bba094c3b 100644 --- a/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormLocationField.swift +++ b/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormLocationField.swift @@ -67,7 +67,6 @@ struct EventFormLocationField: View { .accessibilityLabel("Location suggestions") } } - .eventFormSectionChrome(focused: focusField == .location) .pageJumpChipAnchor(id: "form-location") .onChange(of: focusField) { _, field in fieldFocused = field == .location diff --git a/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormView.swift b/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormView.swift index 15a36a37b..332ac92b9 100644 --- a/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormView.swift +++ b/apps/calendar-macos/CompassUI/Sources/CompassUI/EventForm/EventFormView.swift @@ -103,28 +103,32 @@ public struct EventFormView: View { .id(EventFormField.attendees) } } + .overlay { + if isLogisticsFieldFocused(model.eventFormFocusedField) { + RoundedRectangle(cornerRadius: NativeWebLayoutTokens.radiusDefault) + .stroke(theme.accentColor, lineWidth: 1) + } + } .id(EventFormField.location) - DescriptionEditorView( - html: Binding( - get: { draft.description }, - set: { model.updateDraftFromForm(description: $0) } - ), - resetKey: draft.persistedEventId?.rawValue ?? draft.clientId.rawValue, - isFocused: model.eventFormFocusedField == .description, - isEditable: !isReadOnly, - onLinkCopied: { model.didCopyDescriptionLink() } - ) - .frame(minHeight: 72, maxHeight: 140) - .padding(8) - .background(theme.surfaceOverlayColor) - .clipShape(RoundedRectangle(cornerRadius: 8)) - .overlay( - RoundedRectangle(cornerRadius: 8) - .stroke( - model.eventFormFocusedField == .description ? theme.accentColor : theme.borderColor, - lineWidth: 1 - ) - ) + EventFormCard { + DescriptionEditorView( + html: Binding( + get: { draft.description }, + set: { model.updateDraftFromForm(description: $0) } + ), + resetKey: draft.persistedEventId?.rawValue ?? draft.clientId.rawValue, + isFocused: model.eventFormFocusedField == .description, + isEditable: !isReadOnly, + onLinkCopied: { model.didCopyDescriptionLink() } + ) + .frame(minHeight: 72, maxHeight: 140) + } + .overlay { + if model.eventFormFocusedField == .description { + RoundedRectangle(cornerRadius: NativeWebLayoutTokens.radiusDefault) + .stroke(theme.accentColor, lineWidth: 1) + } + } .pageJumpChipAnchor(id: "form-description") .id(EventFormField.description) @@ -194,4 +198,8 @@ public struct EventFormView: View { titleFocused = field == .title } } + + private func isLogisticsFieldFocused(_ field: EventFormField) -> Bool { + field == .location || field == .conference || field == .attendees + } } diff --git a/docs/features/desktop-web-parity-checklist.md b/docs/features/desktop-web-parity-checklist.md index 5f072a0a2..021efbae0 100644 --- a/docs/features/desktop-web-parity-checklist.md +++ b/docs/features/desktop-web-parity-checklist.md @@ -306,6 +306,7 @@ Legend: **Mod** = ⌘ on macOS. Web bindings from `APP_SHORTCUT_BINDINGS` / `KEY 3. **Command palette** — missing commands, fuzzy highlight, keycap chips, row chrome. 4. **Grid** — now line gradient/rim, now-cue timing/shimmer, all-day tip strip. 5. **Keyboard gaps** — `focus-event` (U), Shift+M week-day focus, palette undo/redo. +6. **Event form logistics card** — match web #4599: one FormCard for Location, Add Google Meet, Add guests; Description in the following FormCard (not nested mini-panels). Each PR should link a child issue, include before/after screenshots (web Chromium + macOS snapshot or manual), label `agent-automerge`, and pass macOS workflow on GitHub runners. @@ -318,6 +319,7 @@ Each PR should link a child issue, include before/after screenshots (web Chromiu | 2026-10-19 | Initial audit checklist for #4331 dogfood gate | | 2026-10-19 | §7 visual evidence table (web CI captures; macOS/compare pending runner) | | 2026-10-19 | §7 updated from workflow run 39299882448 (macOS + compare artifacts) | +| 2026-10-19 | §5 queue: event form logistics grouping (web #4599); CI fixes on main (palette Range, e2e/parity shard) | ---