Skip to content

Improve CN1 playground side menu dark mode, disable swipe, and add mobile responsiveness#4699

Merged
liannacasper merged 5 commits intomasterfrom
codex/fix-side-menu-dark-mode-and-responsiveness
Apr 4, 2026
Merged

Improve CN1 playground side menu dark mode, disable swipe, and add mobile responsiveness#4699
liannacasper merged 5 commits intomasterfrom
codex/fix-side-menu-dark-mode-and-responsiveness

Conversation

@liannacasper
Copy link
Copy Markdown
Collaborator

Motivation

  • Make the playground side menu behave correctly in dark mode and avoid accidental open gestures.
  • Reduce the side menu footprint on desktop and provide a more usable layout on touch/mobile devices by showing preview in a tab instead of side-by-side.

Description

  • Use a desktop detection helper isDesktopLayout() and keep the existing SplitPane (with the 25% editor sizing target) for desktop while switching to a tabbed container for mobile by returning a Tabs with Editor and Preview tabs.
  • Disable side-menu swipe gestures globally for the playground with Toolbar.setEnableSideMenuSwipe(false) to prevent accidental triggering.
  • Expand dark-mode support by adding side-menu related UIIDs (e.g. SideNavigationPanel, PlaygroundSideCommand, PlaygroundMenuSection, etc.) to the supportsDarkVariant list so menu components receive dark variants.
  • Add side-menu landscape size theme constants (sideMenuSizeLandscapeInt and sideMenuSizeTabLandscapeInt) to theme.css so the menu opens narrower (approximately 25% visible width) in desktop/landscape layouts.

Testing

  • Attempted to build the playground with cd scripts/cn1playground && ./build.sh but the script is not executable in this environment, so the build did not run. (failed)
  • Attempted cd scripts/cn1playground && bash build.sh, but the script invokes ./mvnw which is not executable here, so the build did not complete. (failed)
  • Attempted cd scripts/cn1playground && bash ./mvnw -pl common -DskipTests package, but the Maven wrapper failed to download dependencies due to network/proxy restrictions in this environment. (failed)

Codex Task

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

Cloudflare Preview

@liannacasper liannacasper merged commit 810e911 into master Apr 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant