Skip to content

fix(reminder-modal): make the relative/absolute tab toggle switch fields#2080

Open
JunwonYoon wants to merge 1 commit into
callumalpass:mainfrom
JunwonYoon:fix/reminder-modal-absolute-toggle
Open

fix(reminder-modal): make the relative/absolute tab toggle switch fields#2080
JunwonYoon wants to merge 1 commit into
callumalpass:mainfrom
JunwonYoon:fix/reminder-modal-absolute-toggle

Conversation

@JunwonYoon

Copy link
Copy Markdown

What

Fixes the Absolute tab in the reminder modal doing nothing — absolute
reminders couldn't be created from the UI. Closes #2079.

Why

ReminderModal.updateFormVisibility() switches the visible field group by adding
the generic .tn-static-display-none-… / .tn-static-display-block-… utility
classes. Those have single-class specificity (0-1-0), but the container base rules
in styles/reminder-modal.css are .tasknotes-plugin .{relative,absolute}-fields
(0-2-0) and include display: flex / display: none. The base rules win, so the
JS toggle has no visible effect.

How

Add scoped overrides so the toggle classes win on these two containers, and use
display: flex for the shown state to preserve the existing flex-column layout
(plain block would drop the gap spacing). CSS-only; no behavior/logic change.

Test plan

  • Reproduced on 4.11.0: Absolute tab does nothing.
  • With this change: open a task → add reminder → toggle Relative ⇄ Absolute,
    fields now switch correctly.
  • Add an absolute reminder (date + time) → saved with type: absolute.
  • Relative path unchanged; default (Relative) still shown on open.

Note for maintainer

This references the generated tn-static-display-* class names directly, matching
how ReminderModal.ts already uses them. If you'd prefer not to depend on the
generated hashes, an alternative is a small semantic state class toggled in the
component instead — happy to switch to that approach if you'd rather.

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) <noreply@anthropic.com>
@JunwonYoon JunwonYoon force-pushed the fix/reminder-modal-absolute-toggle branch from 2cbaa5f to 1393e19 Compare June 25, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Reminder modal Absolute tab does nothing — cannot create absolute reminders

1 participant