Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions apps/sim/components/emcn/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ import { Button } from '../button/button'
const ANIMATION_CLASSES =
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none'

/**
* Modal content animation classes.
* We keep only the slide animations (no zoom) to stabilize positioning while avoiding scale effects.
*/
const CONTENT_ANIMATION_CLASSES =
'data-[state=closed]:slide-out-to-top-[50%] data-[state=open]:slide-in-from-top-[50%] motion-reduce:animate-none'

/**
* Root modal component. Manages open state.
*/
Expand Down Expand Up @@ -160,8 +153,6 @@ const ModalContent = React.forwardRef<
<DialogPrimitive.Content
ref={ref}
className={cn(
ANIMATION_CLASSES,
CONTENT_ANIMATION_CLASSES,
'fixed top-[50%] z-[var(--z-modal)] flex max-h-[84vh] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-xl bg-[var(--bg)] text-small ring-1 ring-foreground/10 duration-200',
MODAL_SIZES[size],
className
Comment on lines 154 to 158
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.

P2 duration-200 is orphaned without animation classes

duration-200 remains in the base class string, but the animate-in/animate-out classes (previously in ANIMATION_CLASSES and CONTENT_ANIMATION_CLASSES) have been removed. duration-200 controls the duration of CSS animations/transitions, so without an active animation or transition to pair with it, this class has no effect on the content element.

If the intent is to keep an animation duration for future use, a comment to that effect would help. Otherwise it can be removed to avoid confusion.

Suggested change
ref={ref}
className={cn(
ANIMATION_CLASSES,
CONTENT_ANIMATION_CLASSES,
'fixed top-[50%] z-[var(--z-modal)] flex max-h-[84vh] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-xl bg-[var(--bg)] text-small ring-1 ring-foreground/10 duration-200',
MODAL_SIZES[size],
className
'fixed top-[50%] z-[var(--z-modal)] flex max-h-[84vh] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-xl bg-[var(--bg)] text-small ring-1 ring-foreground/10',

Expand Down
Loading