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(all): allow server side rendering for all packages #651

Merged
merged 4 commits into from
Mar 2, 2020

Conversation

austingreendev
Copy link
Contributor

@austingreendev austingreendev commented Feb 25, 2020

Description

While adding a GatsbyJS example I found that some of our refactored components, including the new focus-visible utility, aren't rendering correctly in SSR environments.

Along with zendeskgarden/react-containers#163 this PR creates a new useDocument hook in the react-theming package which allows consuming packages to receive a themed Document in a SSR compatible way.

It also migrates all direct document usage (outside of a useEffect) to the useDocument hook across the packages.

We should deploy zendeskgarden/react-containers#163 and upgrade the affected dependencies before merging this PR.

Unrelated

I've also added https://www.npmjs.com/package/@testing-library/react-hook to help test hooks directly.

Checklist

  • 👌 design updates are Garden Designer approved (add the
    designer as a reviewer)
  • 🌐 Styleguidist demo is up-to-date (yarn start)
  • ⬅️ renders as expected with reversed (RTL) direction
  • ♿ analyzed via axe and evaluated using VoiceOver
  • 💂‍♂️ includes new unit tests
  • 📝 tested in Chrome, Firefox, Safari, Edge, and IE11

@coveralls
Copy link

coveralls commented Feb 25, 2020

Coverage Status

Coverage decreased (-0.02%) to 98.033% when pulling 4061201 on agreen/update-examples into 99d33d1 on master.

Copy link
Member

@jzempel jzempel left a comment

Choose a reason for hiding this comment

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

Looks good. Plz hold merge for TBD menuStyles added to react-theming PR.

@jzempel jzempel mentioned this pull request Feb 29, 2020
6 tasks
@austingreendev austingreendev merged commit 74461c5 into master Mar 2, 2020
@austingreendev austingreendev deleted the agreen/update-examples branch March 2, 2020 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants