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

Fix(web-react): Icon component supports SSR #1128

Merged
merged 1 commit into from
Nov 8, 2023
Merged

Conversation

literat
Copy link
Collaborator

@literat literat commented Nov 5, 2023

Description

Additional context

https://www.npmjs.com/package/react-html-parser
https://github.com/peternewnham/react-html-parser
https://stackoverflow.com/questions/39758136/how-to-render-html-string-as-real-html
https://stackoverflow.com/questions/64079321/react-tooltip-and-next-js-ssr-issue

Issue reference


Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Follow the PR Title/Commit Message Convention.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@literat literat requested review from pavelklibani and a team as code owners November 5, 2023 07:27
Copy link

netlify bot commented Nov 5, 2023

Deploy Preview for spirit-design-system-demo canceled.

Name Link
🔨 Latest commit 7a7c08b
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-demo/deploys/654b9a675ed1f600076137ce

Copy link

netlify bot commented Nov 5, 2023

Deploy Preview for spirit-design-system-validations canceled.

Name Link
🔨 Latest commit 7a7c08b
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-validations/deploys/654b9a67ee20c80008d25ff8

Copy link

netlify bot commented Nov 5, 2023

Deploy Preview for spirit-design-system-storybook ready!

Name Link
🔨 Latest commit 7a7c08b
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-storybook/deploys/654b9a67af51e40008ec375a
😎 Deploy Preview https://deploy-preview-1128--spirit-design-system-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the bug Something isn't working label Nov 5, 2023
Copy link

netlify bot commented Nov 5, 2023

Deploy Preview for spirit-design-system-react ready!

Name Link
🔨 Latest commit 7a7c08b
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-react/deploys/654b9a67b6cd1c00089d11a1
😎 Deploy Preview https://deploy-preview-1128--spirit-design-system-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

nx-cloud bot commented Nov 6, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 7a7c08b. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link
Contributor

github-actions bot commented Nov 6, 2023

Coverage Status

coverage: 68.796% (-27.7%) from 96.46%
when pulling 9a3c1d5 on fix/web-react-ssr-icon
into 4a838f7 on main.

@coveralls
Copy link

coveralls commented Nov 6, 2023

Coverage Status

coverage: 79.904% (-16.6%) from 96.46%
when pulling 7a7c08b on fix/web-react-ssr-icon
into 495c4d5 on main.

@literat literat force-pushed the fix/web-react-ssr-icon branch 2 times, most recently from 13b458e to df5ebf0 Compare November 8, 2023 14:22
  * `dangerouslySetInnerHtml` do not work while rendering on server
  * this `Warning: Prop `dangerouslySetInnerHTML` did not match.` error
    was raised
  * we can avoid this by wrapping the component with something like
    `<NoSsr>`
  * @see: https://stackoverflow.com/questions/64079321/react-tooltip-and-next-js-ssr-issue
  * or by using some library like ReactHtmlParser to render HTML string
    magically as a component
  * @see: https://www.npmjs.com/package/react-html-parser
@literat literat force-pushed the fix/web-react-ssr-icon branch from df5ebf0 to 7a7c08b Compare November 8, 2023 14:25
@literat literat merged commit 79f9f6f into main Nov 8, 2023
24 checks passed
@literat literat deleted the fix/web-react-ssr-icon branch November 8, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants