Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: remove animation from test environments",
"packageName": "@fluentui/react-dialog",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@ export const renderDialog_unstable = (state: DialogState, contextValues: DialogC
<DialogProvider value={contextValues.dialog}>
<DialogSurfaceProvider value={contextValues.dialogSurface}>
{trigger}
<Transition
mountOnEnter
unmountOnExit
in={state.open}
nodeRef={state.dialogRef}
// FIXME: this should not be hardcoded tokens.durationGentle
timeout={250}
>
{status => <DialogTransitionProvider value={status}>{content}</DialogTransitionProvider>}
</Transition>
{process.env.NODE_ENV === 'test' ? (
state.open && <DialogTransitionProvider value={'entered'}>{content}</DialogTransitionProvider>
) : (
<Transition
mountOnEnter
unmountOnExit
in={state.open}
nodeRef={state.dialogRef}
// FIXME: this should not be hardcoded tokens.durationGentle
timeout={250}
>
{status => <DialogTransitionProvider value={status}>{content}</DialogTransitionProvider>}
</Transition>
)}
</DialogSurfaceProvider>
</DialogProvider>
);
Expand Down