Skip to content

Render React in playground #869

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

Closed

Conversation

tsnobip
Copy link
Member

@tsnobip tsnobip commented May 24, 2024

Now ready for review @fhammerschmidt :)

Copy link

vercel bot commented May 24, 2024

@tsnobip is attempting to deploy a commit to the ReScript Association Team on Vercel.

A member of the Team first needs to authorize it.

@tsnobip tsnobip marked this pull request as draft May 24, 2024 16:18
@tsnobip tsnobip force-pushed the react_output_in_playground branch from 6639afe to 301e587 Compare May 24, 2024 16:23
@tsnobip tsnobip marked this pull request as ready for review May 24, 2024 21:41
@fhammerschmidt
Copy link
Member

Do you think the react deps should be listed here as well?
image

Copy link

vercel bot commented May 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rescript-lang.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 25, 2024 10:09am

@tsnobip
Copy link
Member Author

tsnobip commented May 25, 2024

Do you think the react deps should be listed here as well? image

I don't think so, those are ReScript dependencies.

@tsnobip
Copy link
Member Author

tsnobip commented May 25, 2024

I'm actually wondering if a Console panel is that much needed, one could just open the console of the browser and have a better rendering of the logs, what do you guys think?

@fhammerschmidt
Copy link
Member

I would keep the Console tab but maybe we can have a hybrid of both Rendering and Console. In practice you most often want to have either Console or HTML, only more convoluted examples may have both.

@tsnobip
Copy link
Member Author

tsnobip commented May 26, 2024

That's an interesting idea, we could do that in a follow-up PR. We could use "output" as the name of this tab.

@fhammerschmidt
Copy link
Member

Why would we want to add a new tab now only to remove it again later? Let's just add it here. Or hide it and only reveal it in the next PR.

@tsnobip
Copy link
Member Author

tsnobip commented May 27, 2024

Well to be honest I'm not sure of what's the best solution here, I'm a bit afraid that having to switch between the "output" tab and the console tab of your browser might be a bit confusing too, what about asking in the forum maybe?

edit: done here https://forum.rescript-lang.org/t/output-of-the-code-run-in-the-playground/5269

@tsnobip
Copy link
Member Author

tsnobip commented May 31, 2024

@fhammerschmidt can you take a look, in the last commit I shipped the "Output" layout, there's the react panel first then the console output. Let me know if you prefer this.

To be honest, I still think we should rather use the built-in browser dev console for the console output.

@fhammerschmidt
Copy link
Member

this got merged in #875 🎉

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.

2 participants