Skip to content

Implement in-browser code playground with live execution - #5047

Open
anshul23102 wants to merge 1 commit into
codeharborhub:mainfrom
anshul23102:feat/5024-code-playground
Open

Implement in-browser code playground with live execution#5047
anshul23102 wants to merge 1 commit into
codeharborhub:mainfrom
anshul23102:feat/5024-code-playground

Conversation

@anshul23102

@anshul23102 anshul23102 commented Jul 27, 2026

Copy link
Copy Markdown

Adds interactive code playground with split-pane editor and live execution for JavaScript, HTML, and CSS.

Features:

  • CodePlayground component with dual-pane layout (editor + output)
  • JavaScript execution with console.log/error/warn support
  • HTML live preview in sandboxed iframe
  • CSS preview with sample styling area
  • Tab indentation and Ctrl+Enter to run code
  • Color-coded console output
  • Quick actions: Run, Copy, Reset buttons
  • Responsive mobile design
  • Comprehensive error handling

Supports:

  • JavaScript ES6+ with async/await
  • HTML5 with event handlers
  • CSS3 with animations and transforms

Documentation includes examples for all languages with keyboard shortcuts.

Closes #5024

…arborhub#5024)

Add interactive code playground component supporting JavaScript, HTML, and CSS:
- CodePlayground.jsx: Dual-pane editor with console output and live preview
  - JavaScript execution with console.log/error/warn support
  - HTML live preview with event handler support
  - CSS preview with sample HTML rendering
  - Tab indentation, syntax-aware editing
  - Ctrl+Enter keyboard shortcut to run

- CodePlayground.module.css: Professional split-view styling
  - Responsive grid layout
  - Color-coded console output (log/error/warn/info)
  - Smooth transitions and hover effects
  - Mobile-responsive stack view
  - Custom scrollbar styling

- CodePlaygroundExample.mdx: Complete documentation with examples
  - Language support overview
  - Keyboard shortcuts reference
  - Usage examples for all languages
  - Accessibility features documented
  - Tips and limitations

Features:
✓ Split editor/output panes with live execution
✓ Console output with message type indicators
✓ HTML preview in sandboxed iframe
✓ CSS preview with sample styling area
✓ Tab indentation support
✓ Quick action buttons: Run, Copy, Reset
✓ Keyboard accessibility
✓ Mobile responsive design
✓ Error handling and reporting
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great job, @anshul23102! 🎉 Thank you for submitting your pull request to CodeHarborHub. We appreciate your contribution and enthusiasm! Our team will review it soon. If you have any questions or need further assistance, feel free to reach out. Thanks for contributing!

@deepsource-io

deepsource-io Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

DeepSource Code Review

We reviewed changes in d148591...45e9eac on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Jul 27, 2026 6:06p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@github-actions

Copy link
Copy Markdown

⚡️ Lighthouse Report for the Deploy Preview of this PR 🚀

🔗 Site: CodeHarborHub | Live Site

URL 🌐 Performance Accessibility Best Practices SEO 📊
/ 🔴 33 🟡 77 🟡 75 🟢 100 📄
/docs 🟡 52 🟡 87 🟢 96 🟢 100 📄
/courses 🟡 56 🟡 86 🟢 96 🟢 100 📄
/showcase 🟡 51 🟡 87 🟡 75 🟡 86 📄
/community 🟡 56 🟡 86 🟢 96 🟢 100 📄

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.

Implement in-browser code playground with live execution

1 participant