Skip to content

fix: improve playground mobile responsiveness - #750

Merged
ooples merged 6 commits into
masterfrom
fix/mobile-responsive-docs
Jan 23, 2026
Merged

ooples merged 6 commits into
masterfrom
fix/mobile-responsive-docs

Conversation

@ooples

@ooples ooples commented Jan 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Enable word wrap in Monaco editor for better mobile display
  • Add aggressive overflow controls to prevent horizontal scrolling
  • Constrain panel headers and editor containers to viewport width
  • Add max-width: 100vw to root elements on mobile
  • Fix Monaco editor width with deep CSS selectors

Test plan

  • Open playground on mobile device or Chrome DevTools mobile simulator
  • Verify code editor fits within viewport width
  • Verify "Code Editor" and "Program.cs" header is visible and not cut off
  • Verify long lines of code wrap properly
  • Verify output panel displays correctly

🤖 Generated with Claude Code

ooples and others added 5 commits January 22, 2026 15:52
- Add custom main.css with mobile-responsive styles
- Tables now scroll horizontally on mobile instead of overflowing
- Code blocks have proper overflow handling
- Improved typography and spacing for mobile screens
- Add templates/modern to docfx.json template list
- Add _playground_new to .gitignore

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
GitHub Pages uses Jekyll by default which ignores folders starting
with underscore (_). The _framework and _content folders are critical
for Blazor WASM applications to work. Adding .nojekyll file prevents
Jekyll processing and allows these folders to be served correctly.

This fixes the playground "unhandled error" issue on the live site.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- scope table layout rules to mobile media query only
- remove tr from display:table selector to fix table formatting
- add position:relative to table for scroll indicator anchor
- use overflow-wrap instead of legacy word-wrap in print styles
- ensure _site directory exists before creating .nojekyll

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- add mobile breakpoints to mainlayout header and footer
- stack toolbar vertically on mobile with full-width buttons
- switch editor and output to vertical layout on mobile
- hide less critical buttons on very small screens (< 480px)
- use dynamic viewport height (dvh) for better mobile support
- reduce font sizes and padding for mobile screens

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- enable word wrap in monaco editor for better mobile display
- add aggressive overflow controls to prevent horizontal scrolling
- constrain panel headers and editor containers to viewport width
- add max-width: 100vw to root elements on mobile
- fix monaco editor width with deep css selectors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jan 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
aidotnet-playground-api Ready Ready Preview, Comment Jan 23, 2026 1:40pm

@coderabbitai

coderabbitai Bot commented Jan 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Enhanced mobile responsiveness across the application and documentation site with improved layout, typography, and touch targets for small screens.
    • Optimized editor experience on mobile devices with word-wrapping and responsive panel stacking.
  • Chores

    • Improved GitHub Pages deployment compatibility.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

This PR implements mobile-responsive design improvements across the documentation and playground components while ensuring GitHub Pages compatibility. Changes include adding .nojekyll markers in deployment workflows, updating configuration files, and introducing extensive CSS media queries for responsive layouts on small screens.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow Updates
.github/workflows/docs.yml, .github/workflows/sonarcloud.yml
Add .nojekyll file creation steps to prevent GitHub Pages from ignoring underscore-prefixed folders in both conditional and unconditional deployment paths.
Configuration & Ignore Files
.gitignore, docfx.json
Add ignore patterns for _playground_new/ and _playground_test/ directories; extend template array with templates/modern path for DocFX builds.
Playground Layout Responsiveness
src/AiDotNet.Playground/MainLayout.razor
Add mobile-responsive CSS with viewport height adjustments, flex constraints for header/footer/content, and media queries for screens ≤768px and ≤480px affecting spacing, font sizes, and visibility.
Playground Editor Responsiveness
src/AiDotNet.Playground/Pages/Index.razor
Add container overflow handling, Monaco editor width constraints, and extensive mobile media queries to reflow editor panels vertically; enable word wrapping in editor options for mobile usability.
Documentation CSS Mobile Enhancements
templates/modern/public/main.css
Add mobile-first responsive styling for tables (scrollable with gradient indicators), code blocks, navigation, content spacing, typography scaling, and print formatting across 768px and 480px breakpoints.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

Suggested labels

feature

Poem

🐰 Mobile hops across the screen so small,
Responsive layout answers the call!
.nojekyll guards the underscore halls,
While CSS queries dance through breakpoints, one and all—
A fluffy web, now friendly to all! 📱✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main focus of this PR: improving mobile responsiveness in the playground, which aligns with all file changes.
Description check ✅ Passed The description is directly related to the changeset, providing a clear summary of the mobile responsiveness improvements and a concrete test plan for validation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/mobile-responsive-docs

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added the feature Feature work item label Jan 23, 2026
@sonarqubecloud

Copy link
Copy Markdown

@ooples
ooples merged commit 81f82ad into master Jan 23, 2026
39 checks passed
@ooples
ooples deleted the fix/mobile-responsive-docs branch January 23, 2026 17:17

This branch was successfully deployed

1 active deployment
Preview — 076e46db Deployed Jan 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Feature work item

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant