fix(reminder-modal): make the relative/absolute tab toggle switch fields#2080
Open
JunwonYoon wants to merge 1 commit into
Open
fix(reminder-modal): make the relative/absolute tab toggle switch fields#2080JunwonYoon wants to merge 1 commit into
JunwonYoon wants to merge 1 commit into
Conversation
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>
2cbaa5f to
1393e19
Compare
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.
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 addingthe generic
.tn-static-display-none-…/.tn-static-display-block-…utilityclasses. Those have single-class specificity (0-1-0), but the container base rules
in
styles/reminder-modal.cssare.tasknotes-plugin .{relative,absolute}-fields(0-2-0) and include
display: flex/display: none. The base rules win, so theJS toggle has no visible effect.
How
Add scoped overrides so the toggle classes win on these two containers, and use
display: flexfor the shown state to preserve the existing flex-column layout(plain
blockwould drop thegapspacing). CSS-only; no behavior/logic change.Test plan
fields now switch correctly.
type: absolute.Note for maintainer
This references the generated
tn-static-display-*class names directly, matchinghow
ReminderModal.tsalready uses them. If you'd prefer not to depend on thegenerated hashes, an alternative is a small semantic state class toggled in the
component instead — happy to switch to that approach if you'd rather.