From 1393e1906b30b3213d57ede1219a980a024cf35d Mon Sep 17 00:00:00 2001 From: JunwonYoon Date: Thu, 25 Jun 2026 15:49:07 +0900 Subject: [PATCH] fix(reminder-modal): make the relative/absolute tab toggle switch fields The Absolute tab in the Add reminder modal did nothing: the relative fields stayed and the absolute date/time fields never appeared, so absolute reminders could not be created from the UI. updateFormVisibility() toggles visibility by adding the generic .tn-static-display-{none,block} utility classes (single-class specificity), but the scoped base rules .tasknotes-plugin .{relative,absolute}-fields set display:flex/none at higher specificity and win, so the toggle had no effect. Add scoped overrides so the toggle wins on these two containers, using display:flex for the shown state to preserve the existing flex-column layout. Co-Authored-By: Claude Opus 4.8 (1M context) --- styles/reminder-modal.css | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/styles/reminder-modal.css b/styles/reminder-modal.css index f75bfad0..e6dd3564 100644 --- a/styles/reminder-modal.css +++ b/styles/reminder-modal.css @@ -325,6 +325,22 @@ body.is-mobile .tasknotes-plugin .reminder-modal__action-btn svg { display: none; } +/* The relative/absolute tab toggle (ReminderModal.updateFormVisibility) switches + fields by adding the generic .tn-static-display-{none,block} utility classes. + Those are single-class (0-1-0) and lose to the scoped base rules above + (.tasknotes-plugin .{relative,absolute}-fields, 0-2-0), so without these + overrides the toggle has no effect and the Absolute tab appears to do nothing. + Scope the toggle to these containers so it wins, keeping flex layout when shown. */ +.tasknotes-plugin .relative-fields.tn-static-display-none-6b99de8b, +.tasknotes-plugin .absolute-fields.tn-static-display-none-6b99de8b { + display: none; +} + +.tasknotes-plugin .relative-fields.tn-static-display-block-2a1b75c9, +.tasknotes-plugin .absolute-fields.tn-static-display-block-2a1b75c9 { + display: flex; +} + /* Form controls - Match Task Modal Details Section */ .tasknotes-plugin .reminder-modal__form .setting-item { padding: var(--size-4-2) 0;