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

[website] Fix LiveEditor so code is displayed in the documentation (e.g. quickstart) #554

Merged
merged 1 commit into from
Dec 29, 2021

Conversation

kinow
Copy link
Contributor

@kinow kinow commented Dec 28, 2021

Hi,

I am experimenting with H3 for a project at $work, and noticed that all the live code editors were showing the same error message in the H3 website (screenshot from https://h3geo.org/docs/quickstart#point--cell):

image

I think it was due this this PR in docusaurus: facebook/docusaurus#5349

The isClient was removed from the context, so in the theme configuration, isClient is always undefined. That causes the code to be always an empty string too.

This PR uses the useIsBrowser used in the linked PR in docusaurus. It works for me locally after this change 👍

image

Thanks for H3 🚀
-Bruno

@CLAassistant
Copy link

CLAassistant commented Dec 28, 2021

CLA assistant check
All committers have signed the CLA.

@kinow kinow changed the title isClient is always undefined when using the docusaurus context. Use new useIsBrowser [website] isClient is always undefined when using the docusaurus context. Use new useIsBrowser Dec 28, 2021
@kinow kinow changed the title [website] isClient is always undefined when using the docusaurus context. Use new useIsBrowser [website] Fix LiveEditor so code is displayed in the documentation (e.g. quickstart) Dec 28, 2021
@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.2% when pulling 1644617 on kinow:fix-is-client into be83872 on uber:master.

Copy link
Collaborator

@isaacbrodsky isaacbrodsky left a comment

Choose a reason for hiding this comment

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

Thanks for noticing & fixing this issue - confirmed the fix works locally for me

@isaacbrodsky isaacbrodsky merged commit cd47015 into uber:master Dec 29, 2021
@kinow kinow deleted the fix-is-client branch December 29, 2021 01:11
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.

4 participants