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

Dynamic JS pages/components #292

Closed
duailibe opened this issue Dec 15, 2017 · 10 comments
Closed

Dynamic JS pages/components #292

duailibe opened this issue Dec 15, 2017 · 10 comments
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.

Comments

@duailibe
Copy link

duailibe commented Dec 15, 2017

Hey guys! Loving this is open now, I hope to be able to contribute soon!

We've been using just a simple JS script on the Prettier docs playground and I've been pushing for a rewrite in React so we could do some cool stuff more easily:

  • creating the options sidebar automatically so a new PR that changes anything could be more easily integrated to the playground and people can play with it in the PR previews;
  • persisting the state in localStorage

To do that a build process would be necessary.. we currently just serve from /static, so I built a POC with the features above using Preact and https://github.com/developit/preact-in-es3/blob/master/index.js, but it's really cumbersome without JSX and would be nice to do it in React since that's what Docusaurus uses.

We could just build the playground independently (calling the transpiler/bundler and outputing directly to Docusaurus build dir), but would be nice to integrate this somehow so we could reuse the development server and have one script to build them all.

If this use case is something you guys would like to support, I'd love to help!

@JoelMarcey JoelMarcey added the feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. label Dec 18, 2017
@JoelMarcey
Copy link
Contributor

@duailibe Thanks for writing this up. While not totally related, I believe @hramos had to do some customization to get the React Native web player running (e.g., http://facebook.github.io/react-native/docs/flexbox.html); so he might have some insight on this as well.

Let me talk this over a bit with the team.

cc: @ericnakagawa @hramos

@azz
Copy link

azz commented Jan 12, 2018

We'd really like to be able to hydrate the React DOM on the client-side to support some interactions. Is that on the cards?

@endiliey
Copy link
Contributor

I believe this is now achieved in v2, should we close this @yangshun ?

@SimenB
Copy link
Contributor

SimenB commented Oct 24, 2018

There's a v2? 😀 Any changelog somewhere? The one in the root only mentions v1

@endiliey
Copy link
Contributor

endiliey commented Oct 24, 2018

Not yet released @SimenB. https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2

Still working on it

@yangshun
Copy link
Contributor

I think we can close this.

@yangshun
Copy link
Contributor

yangshun commented Oct 24, 2018

On second thought, perhaps we shouldn't close these issues until v2 is released because people might file issues again if they don't see open issues addressing them. WDYT?

@endiliey
Copy link
Contributor

Hmm i'm kinda confused actually because usually when we merge PR that fix a bug we also close the corresponding issue until the next release as well 🤔

@yangshun
Copy link
Contributor

That's true, but that's considering the next release will be out soon. We don't have a launch date for v2 yet. But I guess we can close it for now and see whether there are any downsides of closing them before actually launching.

@endiliey
Copy link
Contributor

Kinda agreed on second thought 🤔. Nah maybe it's time for us to work to launch v2 sooner then before it backfires 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Projects
None yet
Development

No branches or pull requests

6 participants