-
Notifications
You must be signed in to change notification settings - Fork 84
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
Use MWC for search input #1422
base: import-page
Are you sure you want to change the base?
Use MWC for search input #1422
Conversation
A live preview of this PR will be available at the URL below and will update on each commit. = https://pr1422---site-khswqo4xea-wl.a.run.app/
|
// Excludes the given tag names from being handled by the given renderer. | ||
// Returns a subclass of the renderer that returns `false` for matches() | ||
// for any element in the list of tag names. | ||
const excludeElements = ( |
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.
cc @kevinpschaaf @augustjk we might want this utility in lit-ssr
@@ -87,6 +87,7 @@ | |||
}, | |||
"dependencies": { | |||
"@lit-labs/task": "^2.0.0", | |||
"@material/web": "^1.0.0-pre.1", |
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.
I think we need =
here, because we could get a breaking change at any time while we're on pre
, right?
tagName: string, | ||
attributes: Map<string, string> | ||
) { | ||
console.log('matchesClass', tagName, !excludedTagNames.includes(tagName)); |
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.
Remove log
// Excludes the given tag names from being handled by the given renderer. | ||
// Returns a subclass of the renderer that returns `false` for matches() | ||
// for any element in the list of tag names. | ||
const excludeElements = ( |
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 we move this SSR utility stuff to another module?
const result = await response.text(); | ||
|
||
// If the page SSR's, we'll have declarative shadow roots in it. | ||
assert.match(result, '<template shadowroot="open">'); |
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.
Can we do more in the test? Like test some functionality?
This does the minimum I can see to get MWC components working in Lit SSR:
globalThis
with dummy classes that MWC uses in decorator metadata