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

feat: SSR support fixes #2458

Merged
merged 16 commits into from
Oct 6, 2024
Merged

feat: SSR support fixes #2458

merged 16 commits into from
Oct 6, 2024

Conversation

MosheZemah
Copy link
Contributor

@MosheZemah MosheZemah commented Oct 6, 2024

SSR fixes:

  1. Dynamically load react-windowed-select only on client side (since it needs window)
  2. Remove warnings about useLayoutEffect

Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.

https://monday.monday.com/boards/4400799549/pulses/7510834798

@MosheZemah MosheZemah requested a review from a team as a code owner October 6, 2024 07:05
@MosheZemah MosheZemah changed the title SSR support fixes [prerelease] SSR support fixes Oct 6, 2024
@mondaycom mondaycom deleted a comment from github-actions bot Oct 6, 2024
Copy link
Contributor

github-actions bot commented Oct 6, 2024

A new prerelease version of this PR has been published! 🎉
To install this prerelease version, run the following command in your terminal with any one of the packages changed in this PR:

To update monday-ui-react-core:

Or with npm:

@mondaycom mondaycom deleted a comment from github-actions bot Oct 6, 2024
@mondaycom mondaycom deleted a comment from github-actions bot Oct 6, 2024
@mondaycom mondaycom deleted a comment from github-actions bot Oct 6, 2024
@YossiSaadi YossiSaadi changed the title SSR support fixes feat: SSR support fixes Oct 6, 2024
@mondaycom mondaycom deleted a comment from github-actions bot Oct 6, 2024
@mondaycom mondaycom deleted a comment from github-actions bot Oct 6, 2024
@mondaycom mondaycom deleted a comment from github-actions bot Oct 6, 2024
@mondaycom mondaycom deleted a comment from github-actions bot Oct 6, 2024
Copy link
Contributor

github-actions bot commented Oct 6, 2024

A new prerelease version of this PR has been published! 🎉
To install this prerelease version, run the following command in your terminal with any one of the packages changed in this PR:

To update monday-ui-react-core:

Or with npm:

Copy link
Contributor

github-actions bot commented Oct 6, 2024

A new prerelease version of this PR has been published! 🎉
To install this prerelease version, run the following command in your terminal with any one of the packages changed in this PR:

To update monday-ui-react-core:

Or with npm:

fn({ state }) {
if (zIndex) {
state.styles.popper.zIndex = String(zIndex);
{isClient() &&
Copy link
Contributor

Choose a reason for hiding this comment

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

In SSR it wouldn't render anything? is it intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't have a dom element to send to the createPortal so I guess I can't

packages/core/src/components/Dropdown/__tests__/driver.js Outdated Show resolved Hide resolved
Copy link
Contributor

@YossiSaadi YossiSaadi left a comment

Choose a reason for hiding this comment

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

Looks cool for me! let's wait for tests to pass and merge it
@talkor @rivka-ungar do you have any concern regarding this?

@talkor
Copy link
Member

talkor commented Oct 6, 2024

Looks cool for me! let's wait for tests to pass and merge it @talkor @rivka-ungar do you have any concern regarding this?

LGTM!

Copy link
Contributor

github-actions bot commented Oct 6, 2024

A new prerelease version of this PR has been published! 🎉
To install this prerelease version, run the following command in your terminal with any one of the packages changed in this PR:

To update monday-ui-react-core:

Or with npm:

@MosheZemah MosheZemah merged commit 562da71 into master Oct 6, 2024
9 of 10 checks passed
@MosheZemah MosheZemah deleted the feature/moshe/ssr_support branch October 6, 2024 13:02
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.

3 participants