Skip to content

chore: revert OpenTransition prop change to fix undefined TransitionProps in builds #8671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 3 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
5 changes: 3 additions & 2 deletions packages/@react-spectrum/overlays/src/OpenTransition.tsx
Copy link
Member Author

Choose a reason for hiding this comment

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

@snowystinger any thoughts on the changes here? Was working on this with @devongovett and the below isn't great since setting children: ReactElement would mean we need to update the types for Overlay and a bunch of other things

Kinda feels like we just fix the build via props: any and call it since its internal only anyways

Copy link
Member

@snowystinger snowystinger Aug 6, 2025

Choose a reason for hiding this comment

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

I'm fine for it to be any since it's internal

Might be able to just revert the types for that file and turn off the eslint rule that was added as well for explicit modules if that's the issue

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

import React, {JSX, JSXElementConstructor, ReactElement} from 'react';
import {Transition, TransitionProps} from 'react-transition-group';
import {Transition} from 'react-transition-group';

const OPEN_STATES = {
entering: false,
Expand All @@ -32,7 +32,8 @@ const OPEN_STATES = {
*/

export function OpenTransition(
props: TransitionProps
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
Copy link
Member

Choose a reason for hiding this comment

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

honestly, we should just turn off this eslint rule entirely. we decided we aren't going to do this
but I'm ok with that being follow up elsewhere

Copy link
Member Author

Choose a reason for hiding this comment

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

oh lol good point, pushed

props: any
): JSX.Element | ReactElement<any, string | JSXElementConstructor<any>>[] {
// Do not apply any transition if in chromatic.
if (process.env.CHROMATIC) {
Expand Down