-
Notifications
You must be signed in to change notification settings - Fork 15
MWPW-178376: Improve variant layout handling #477
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
- Enhanced variant registration logic with WeakMap for better state management - Cleaned up style application process to ensure proper handling of CSSStyleSheet and fallback to style elements when necessary - Adjusted variable names for consistency and clarity - Avoids duplicate style injection
The variant-layout and variants.js changes are made to the deprecated web-components folder which is not used in tests. Tests use Milo's code instead. Reverting these changes to focus on the Milo dependency update which includes the new subcollection test.
The latest Milo stage commit (15923a43d15f...) introduced a breaking change that uses query string parameters (?filter=) instead of hash parameters (#filter=), causing all MAS tests to fail. Reverting to the previous working commit (85c42131...) until the Milo issue is resolved.
|
@Axelcureno , don't we need the |
Restore the variant layout enhancements that improve stylesheet caching: - Use constructor.name as style key instead of variant name for better isolation - Add WeakMap for tracking variant state per card - Implement stylesheet caching to avoid duplicate CSSStyleSheet instances - Improve browser compatibility with proper fallback handling
yes, I accidentaly reverted the changes but have now brought them back. Thanks for the heads up @honstar. |
mirafedas
left a comment
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.
Could you please add unit tests for this change?
Resolves: MWPW-178376
Related Milo PR: adobecom/milo#4730
Test URL: https://main--cc--adobecom.aem.page/creativecloud/plans?maslibs=mwpw-178376