-
Notifications
You must be signed in to change notification settings - Fork 366
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
Feature request: feature for view console #193
Comments
Hey @kuduzow, that would be great! I have added your feature request to our internal backlog which we use to prioritize what to build next. We can't make any promises about the timing, but it's on the list! If you'd like to work on this feature with us, please create a pull request and we'll help you along the way. For others landing on this issue, feel free to add more context or simply leave a thumbs up 👍 on this comment if you find this feature useful. |
Hi @danilowoz, I was wondering how the following code preview is created (link here): It looks as if it's using CodeSandbox Embedding, but it doesn't use an iframe. Any idea how to implement something like this? (No iframe + with console feature) Thank you! |
Hey @rvlewerissa. The link you sent uses CodeSandbox Embedding, which supports the console component and is wrapped in an iframe. However, we still don't have this component properly working on Sandpack, but we're trying to priority it, as this would be very valuable for the development experience. We can't make any promise of when we will ship it, but we've been working hard to release it as soon as possible. |
@danilowoz Thanks for the really quick response! I just discovered that the example I gave does actually use an iframe, I overlooked 😅 Thanks for the hard work on this feature! Looking forward to it! |
Hey all! I'd like to hear your thoughts about this feature and get to understand what is the best approach for this:
Feel free to drop any message here, and 👍 which one you like the most |
Hi @danilowoz! Overall, I'm pretty happy with the CodeSandbox console. I like that it has a clear button, just like the browser console. For Sandpack, I'm hoping that there will be a standalone component ( My usecase: occasionally, my sandpacks will be demonstrating console output rather than a live preview. Sometimes, I want to show a particular dev warning. In other cases, I have little JS-based exercises, and the goal is for the user to edit the code and then check the console to see the logged output (rather than checking the preview pane to see the UI). It might also be good to include timestamps? It can be useful to know when an item was logged. Or, alternatively, maybe the console could be automatically cleared when the code re-runs? |
I am building a code-teaching tool, so starting off with easy examples of JS functions that simply log to the console is important. I plan to write some testing functions that verify the logged output is correct, in order to provide instant feedback to the student. I've already found your example of capturing console.log data with |
My use case is that our components log message to show that things are happening. It would be helpful to for our users to open the console and see these messages stream in as they interact in the preview. |
Hey @danilowoz , |
Hey @hussamkhatib, thanks. But currently, it's working in progress on #546 There are still a few challenging there, but hopefully I'll be able to ship it on the upcoming weeks |
Hey all! I'm excited to share that we have a beta version of It's meant to be a light version of the browser console, meaning that it will not support all console types or some very specific cases. The idea is to keep Sandpack light and modular, so for any other advanced case, I'd recommend going for console-feed. Here's a sandbox with the component! - Plus, I would really appreciate it if we could exhaustively test this new component and report any eventual problems in this issue. Documentation is coming next! But, here's a summary:
|
First of all thanks a lot for this feature! It's exactly what I was looking for 🙌 I got a small question: is it currently possible to clear the console between renders? |
Hey, thanks! I don't think it's possible now, but if you wish this feature, please create another issue, and then we can address it. It must be something around here: when it gets a message from a refresh or similar, then clean the logs. |
@danilowoz thanks. Added a feature idea: #692 |
Tell us how you think we can improve Sandpack
It would be useful to have component like
<SandpackConsole>
that renders... a sandpack's console.Packages affected
How would your idea work?
It might be a component that renders console or props like
<SandpackPreview console>
to include console into preview.Do you have any examples of how you would like to see us implement it?
It depends on implementation way. The first example right on codesandbox.io ("Console" button on the bottom of preview).
Another way is something like this:
The text was updated successfully, but these errors were encountered: