Skip to content

Conversation

@JasonXuDeveloper
Copy link
Owner

Summary

  • Add responsive JContainer component with max-width constraints following Tailwind/Bootstrap patterns
  • Add ContainerSize enum with sizes: Xs (480px), Sm (640px), Md (768px), Lg (1024px), Xl (1280px), Full (no limit)
  • Add fluent API methods: WithSize(), WithHorizontalPadding(), WithResponsivePadding(), Fluid()
  • Wrap PanelUI and BootstrapEditorUI content in JContainer(ContainerSize.Xs) for centered, constrained layouts
  • Add unit testing requirements to coding guidelines

Test plan

  • Verify JContainerTests pass (45+ test cases)
  • Verify TokensTests pass with new Container token tests
  • Open JEngine Panel window (Window > JEngine > Panel) - content should be centered with max-width
  • Select Bootstrap component in scene - inspector content should be centered
  • Test both dark and light Unity themes
  • Resize windows to verify responsive behavior

🤖 Generated with Claude Code

Add responsive container component following Tailwind/Bootstrap patterns:
- JContainer with ContainerSize enum (Xs/Sm/Md/Lg/Xl/Full)
- Fluent API: WithSize(), WithHorizontalPadding(), WithResponsivePadding(), Fluid()
- Container tokens in Tokens.cs (480/640/768/1024/1280px)
- CSS classes for styling: j-container--xs/sm/md/lg/xl/full
- Wrap PanelUI and BootstrapEditorUI content in JContainer(Xs)
- Rename .j-container to .j-panel-base in base.uss to avoid conflicts

Also adds unit testing requirements to coding guidelines and comprehensive
tests for JContainer (45+ test cases covering all functionality).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
Copilot AI review requested due to automatic review settings February 1, 2026 04:51
@github-actions github-actions bot added documentation Improvements or additions to documentation tests editor labels Feb 1, 2026
@JasonXuDeveloper JasonXuDeveloper enabled auto-merge (squash) February 1, 2026 04:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a responsive JContainer layout component that provides max-width constraints and horizontal centering for Unity Editor UI, following Tailwind CSS container patterns.

Changes:

  • Adds JContainer component with configurable size constraints (Xs, Sm, Md, Lg, Xl, Full) and fluent API methods for responsive layouts
  • Wraps PanelUI and BootstrapEditorUI content in JContainer(ContainerSize.Xs) to create centered, compact layouts
  • Updates coding guidelines to require unit tests for non-core packages (JEngine.UI, JEngine.Util) with comprehensive documentation and examples

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
JContainer.cs New responsive container component with max-width constraints, fluent API, and proper inheritance from JComponent
JContainer.cs.meta Unity meta file for new component
JContainerTests.cs Comprehensive unit tests (45+ test cases) covering all public methods, properties, and edge cases
JContainerTests.cs.meta Unity meta file for test class
JTheme.cs Adds ContainerSize enum (Xs, Sm, Md, Lg, Xl, Full) with XML documentation
Tokens.cs Adds Container token class with max-width constants matching Tailwind breakpoints
TokensTests.cs Unit tests validating Container token values and hierarchy
components.uss Adds CSS styles for .j-container and size variants (--xs through --full)
base.uss Renames .j-container to .j-panel-base to avoid naming conflict with new component
PanelUI.cs Wraps content in JContainer(ContainerSize.Xs) for centered panel layout
BootstrapEditorUI.cs Wraps content in JContainer(ContainerSize.Xs) for centered inspector layout (in both initial render and undo/redo rebuild)
PanelUITests.cs Improves integration tests to use existing Init.unity scene instead of creating empty scenes, avoiding lighting errors
JEngineTestBase.cs Updates comments to be more general about suppressing Unity internal errors
CLAUDE.md Adds requirement for unit tests in non-core packages
coding-patterns.md Adds comprehensive unit testing section with patterns, requirements, and examples

@github-actions
Copy link

github-actions bot commented Feb 1, 2026

Unity Test Results

EditMode: All tests passed
PlayMode: All tests passed

Unity Version: 2022.3.55f1
Project Path: UnityProject

✅ All tests passed! The PR is ready for review.

View workflow run

Click here to view the full workflow run

@codecov
Copy link

codecov bot commented Feb 1, 2026

Codecov Report

❌ Patch coverage is 98.26087% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.35%. Comparing base (05a92f8) to head (1ae0e29).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #613      +/-   ##
==========================================
+ Coverage   85.01%   90.35%   +5.33%     
==========================================
  Files          60       65       +5     
  Lines        7683     8684    +1001     
==========================================
+ Hits         6532     7846    +1314     
+ Misses       1151      838     -313     
Flag Coverage Δ
ui 90.34% <98.26%> (+6.74%) ⬆️
util 90.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Auto-approved: Copilot review found no issues and Unity Tests passed (or were skipped for non-code changes).

@JasonXuDeveloper JasonXuDeveloper merged commit a4666d0 into master Feb 1, 2026
25 checks passed
@JasonXuDeveloper JasonXuDeveloper deleted the feat/ui-container-component branch February 1, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation editor tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants