-
Notifications
You must be signed in to change notification settings - Fork 13
Implement contain-intrinsic-size for improved test page performance and stability #4822
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
base: main
Are you sure you want to change the base?
Conversation
@copilot please retry. |
Co-authored-by: mfranzke <[email protected]>
Co-authored-by: mfranzke <[email protected]>
I've successfully implemented Key implementations:
Benefits achieved:
The implementation includes fallback graceful degradation for older browsers while targeting modern browsers used in testing (Chrome 83+, Firefox 107+, Safari 15.4+). Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
contain-intrinsic-size
for test pages#root, | ||
.component-test-wrapper { | ||
contain: layout; | ||
contain-intrinsic-size: 1024px 768px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand, contain-intrinsic-size only takes effect with size containment.
„…for layout when the element is subject to size containment.“
Please check all contain: layout rules that use it to contain: layout size (or pair with content-visibility).
/* Use contain-intrinsic-size for better layout stability during testing */ | ||
#root { | ||
contain: layout size; | ||
contain-intrinsic-size: 800px 600px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#root sizing is defined twice with conflicting values (800×600 in index.html vs 1024×768 in test-optimizations.css).
|
||
/* Base test container optimization */ | ||
.test-container, | ||
#root, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#root sizing is defined twice with conflicting values (800×600 in index.html vs 1024×768 in test-optimizations.css).
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR implements
contain-intrinsic-size
CSS property across test pages to improve layout stability, performance, and consistency during test execution.Problem
Test pages in the design system were experiencing layout instability and performance issues during automated testing, particularly when content loads asynchronously or when layout recalculations occur.
Solution
Implemented CSS containment with
contain-intrinsic-size
to provide:Changes Made
Modified Test Pages
contain: layout size
andcontain-intrinsic-size: 800px 600px
to#root
elementcontain-intrinsic-size: 1200px 800px
min-block-size
withcontain-intrinsic-size
for better performanceNew Files
packages/components/test/test-optimizations.css
: Reusable containment classes for different test scenariospackages/components/test/CONTAIN-INTRINSIC-SIZE.md
: Comprehensive documentationpackages/components/test/contain-intrinsic-size-validation.html
: Test page to validate implementationCSS Classes Available
Browser Support
Covers all modern browsers used in the testing environment with graceful fallback for older browsers.
Fixes #4340
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.