Skip to content
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

refactor(cxl-ui): use @lit/context for media queries #356

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anoblet
Copy link
Collaborator

@anoblet anoblet commented Nov 2, 2023

No description provided.

Copy link

github-actions bot commented Nov 2, 2023

size-limit report 📦

Path Size
packages/cxl-ui/pkg/dist-web/cxl-ui.js 64.1 KB (+0.09% 🔺)
packages/cxl-ui/pkg/dist-web/cxl-ui-jwplayer.js 11.87 KB (0%)
packages/cxl-ui/pkg/dist-web/cxl-ui-playbooks.js 27.69 KB (0%)
packages/cxl-ui/pkg/dist-web/vendor.js 136.49 KB (+0.68% 🔺)
packages/cxl-ui/pkg/dist-web/cxl-ui-jwplayer.js, packages/cxl-ui/pkg/dist-web/cxl-ui-playbooks.js, packages/cxl-ui/pkg/dist-web/cxl-ui.js, packages/cxl-ui/pkg/dist-web/manifest.js, packages/cxl-ui/pkg/dist-web/unresolved.js, packages/cxl-ui/pkg/dist-web/vendor.js 241.3 KB (+0.41% 🔺)

@anoblet anoblet force-pushed the anoblet/refactor/context branch 2 times, most recently from 83044fe to d964bfb Compare November 2, 2023 15:34
@anoblet
Copy link
Collaborator Author

anoblet commented Nov 2, 2023

Task linked: CU-86aymme98 Explore @lit/context

Copy link

@lkraav lkraav left a comment

Choose a reason for hiding this comment

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

Very interesting experiment. What's the fundamental win or improvement with lit-context over whatever Vaadin's MediaQueryController or whatnot?

@@ -0,0 +1,3 @@
import { createContext } from '@lit/context';

export const mediaContext = createContext(Symbol('media-context'));
Copy link

Choose a reason for hiding this comment

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

Should it be a more specific mediaQueryContext maybe?

"Media" alone seems like could be related to video, or whatnot more broad concept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants