Skip to content

Conversation

mfrances17
Copy link
Contributor

@mfrances17 mfrances17 commented Mar 14, 2025

What: Closes #11658

This fixes all remaining issues related to the JSX transform changes that were made in #11582, specifically, the demos and examples that were either missed during the original sweep through the source, or were edge cases to the original scripts that were run.

All demos and examples should now work as expected, and they should not throw any errors when run or when opened in an IDE.

Edit: These changes will also resolve #11598, #11651, and #11652.

@patternfly-build
Copy link
Contributor

patternfly-build commented Mar 14, 2025

@mfrances17 mfrances17 requested review from a team, kmcfaul, thatblindgeye and wise-king-sullyman and removed request for a team March 14, 2025 23:16
@mfrances17 mfrances17 marked this pull request as ready for review March 14, 2025 23:16
Copy link
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

Looks like there's one case of React.Fragment still being used in the PaginatedTable jsx file, under RTL demos. And since you had updated a comment to remove React., the Alert component's actionLinks description could be updated similarly (from "...in an array or React.Fragment" to "...in an array or React fragment"

The CustomMenus md demo file also needs useEffect added to the import statement.

Copy link
Contributor

@kmcfaul kmcfaul left a comment

Choose a reason for hiding this comment

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

Outside of the aforementioned bits, I didn't see anything else that looked out of place so the rest lgtm.

I am a little curious why React.JSX.Element works without an import now, unless we import it globally elsewhere?

@mfrances17
Copy link
Contributor Author

I am a little curious why React.JSX.Element works without an import now, unless we import it globally elsewhere?

It's because TypeScript recognizes React.JSX.Element as a type, provided by @types/react, so it doesn't need to be explicitly imported.

@mfrances17
Copy link
Contributor Author

mfrances17 commented Mar 17, 2025

@thatblindgeye The latest changes should resolve those issues, plus a few more that were related to importing type JSX instead of using React.JSX. I've re-tested all examples and demos, should be good now.

@thatblindgeye thatblindgeye merged commit 546aaa1 into patternfly:main Mar 17, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants