Skip to content
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

Upgrade client to React 18 (and upgrade dependencies). #6114

Merged
merged 26 commits into from
Jun 14, 2023
Merged

Conversation

nikk15
Copy link
Contributor

@nikk15 nikk15 commented Jun 5, 2023

I had hoped to upgrade Admin to React 18 also, but as there is a tangled web of packages relying on earlier versions of react, react-admin and material UI, I am leaving this for when we swap those components out for Lilypad.

@nikk15 nikk15 marked this pull request as ready for review June 5, 2023 21:10
src/avatar.html Show resolved Hide resolved
src/avatar.html Outdated
</script>
</head>

<body>
<div id="support-root"></div>
<div id="ui-root"></div>
<div id="avatar-ui-root"></div>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Each html file has a unique ui-root id as React 18 complains if we createRoot on an id more than once.

@hrithikwins
Copy link

Hii @nikk15 I have migrated the src/react-components/avatar-editor.js to React 18, I need to do some final sanity on it before a PR, I'll put the link to PR here ...

I think regarding the formatting, those spaces are probably generated by the Typescript formatter, Having Prettier as default formatter should solve most of the problems

const width = el.offsetWidth;
const height = el.offsetHeight;
const ratio = height / width;
const scale = (CHAT_MESSAGE_TEXTURE_SIZE * Math.min(1.0, 1.0 / ratio)) / el.offsetWidth;
Copy link
Contributor

Choose a reason for hiding this comment

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

el.offsetWidth; could be "width"

Copy link
Contributor

@nickgrato nickgrato left a comment

Choose a reason for hiding this comment

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

few comments here and in discord but no show stoppers. lgtm

@nikk15 nikk15 temporarily deployed to hc-bio June 14, 2023 18:49 — with GitHub Actions Inactive
@nikk15 nikk15 temporarily deployed to smoke June 14, 2023 18:49 — with GitHub Actions Inactive
Copy link
Contributor

@netpro2k netpro2k left a comment

Choose a reason for hiding this comment

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

lgtm

@nikk15 nikk15 merged commit d0c6eb8 into master Jun 14, 2023
12 checks passed
@nikk15 nikk15 deleted the react-18 branch June 14, 2023 18:57
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.

None yet

5 participants