Skip to content

style: use tailwind for Dedication#1543

Merged
tyler-dane merged 3 commits intomainfrom
style/dedication
Mar 16, 2026
Merged

style: use tailwind for Dedication#1543
tyler-dane merged 3 commits intomainfrom
style/dedication

Conversation

@tyler-dane
Copy link
Copy Markdown
Contributor

@tyler-dane tyler-dane commented Mar 16, 2026

Note

Low Risk
Low risk UI-only change that swaps the modal implementation and styling; main risk is behavioral/accessibility differences in focus management and <dialog> browser quirks.

Overview
Reworks the Dedication overlay to use a native <dialog> with Tailwind classes and @phosphor-icons/react for the close icon, including explicit open/close + transition handling and Escape key support.

Removes react-modal (and its transitive deps) from package.json/yarn.lock, deletes the old styled-components styles and barrel export, and updates imports in CalendarView and DayViewContent to point directly at Dedication/Dedication.

Written by Cursor Bugbot for commit 956357b. This will update automatically on new commits. Configure here.

…ion effects

- Added state management for dialog visibility using useState.
- Implemented open and close functions to handle dialog display.
- Enhanced dialog transitions with CSS for smoother appearance and disappearance.
- Updated hotkey handling for closing the dialog with escape and toggling with ctrl+shift+0.
- Improved accessibility by preventing default behavior on dialog cancel events.
@tyler-dane tyler-dane marked this pull request as ready for review March 16, 2026 03:06
@tyler-dane tyler-dane merged commit feafb51 into main Mar 16, 2026
9 checks passed
@tyler-dane tyler-dane deleted the style/dedication branch March 16, 2026 03:06
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

if (!isVisible) {
dialogRef.current?.close();
}
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bubbled transitionend events may close dialog prematurely

Medium Severity

handleTransitionEnd doesn't check whether the transitionend event originated from the <dialog> itself or bubbled up from a child. The inner content div has transition-transform duration-300 and the close button has transition-[filter] duration-200. When closing, these child transitionend events bubble to the dialog and trigger dialogRef.current?.close(). The close button's 200ms filter transition can fire 100ms before the dialog's 300ms opacity transition completes, causing the dialog to snap closed abruptly instead of smoothly fading out. Comparing e.target to e.currentTarget would prevent reacting to bubbled events.

Additional Locations (1)
Fix in Cursor Fix in Web

import { useRef, useState } from "react";
import { useHotkeys } from "react-hotkeys-hook";
import Modal from "react-modal";
import { XIcon } from "@phosphor-icons/react";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed last consumer of StyledXIcon, leaving dead code

Low Severity

The old Dedication.tsx was the only consumer of StyledXIcon from @web/components/Icons/X.tsx. By replacing it with XIcon from @phosphor-icons/react, the entire X.tsx file becomes dead code — it exports StyledXIcon which is no longer imported anywhere in the codebase.

Fix in Cursor Fix in Web

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.

1 participant