-
Notifications
You must be signed in to change notification settings - Fork 1k
[reactive-element] New queryAssignedNodes API and deprecate current API #2338
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
Conversation
🦋 Changeset detectedLatest commit: ef9216d The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📊 Tachometer Benchmark ResultsSummarynop-update
render
update
update-reflect
Resultslit-element-list
render
update
update-reflect
lit-html-kitchen-sink
render
update
nop-update
lit-html-repeat
render
update
lit-html-template-heavy
render
update
reactive-element-list
render
update
update-reflect
|
ad439fc to
b3dae4b
Compare
107cad6 to
02641bc
Compare
aomarks
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.
Transformer part of this LGTM, great stuff!
| property: ts.ClassElement, | ||
| decorator: ts.Decorator | ||
| ) { | ||
| if (this.legacyVisitor.visit(litClassContext, property, decorator)) { |
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.
Clever!
…ecated legacy API. This brings the queryAssignedNodes API to a symmetry with the @queryAssignedElements API.
Minor refactoring has been done so that the legacy assignedNodes visitor can be run ahead of the extended queryAssignedElementsVisitor which was slightly refactored.
79db184 to
3a71b8d
Compare
3a71b8d to
cc0295c
Compare
|
Do our docs not show overloads, or do they not show deprecated overloads? |
packages/reactive-element/src/decorators/query-assigned-nodes.ts
Outdated
Show resolved
Hide resolved
packages/reactive-element/src/decorators/query-assigned-nodes.ts
Outdated
Show resolved
Hide resolved
packages/reactive-element/src/decorators/query-assigned-nodes.ts
Outdated
Show resolved
Hide resolved
Our generated API documentation does not show overloads. |
Also removed the object creation and destructuring method of normalizing arguments.
930952a to
ef9216d
Compare
Addresses: #2332 and #2171
Following the inclusion of queryAssignedElements, this change adds a new API and deprecates the old
@queryAssignedNodesAPI.Note the new
queryAssignedNodesoptions does not includeselector. If usingselectorplease use@queryAssignedElements.@queryAssignedNodes('', false, '.item')is functionally identical to@queryAssignedElements({slot: '', flatten: false, selector: '.item'})or@queryAssignedElements({selector: '.item'}).Features
@queryAssignedElements.@queryAssignedNodessupports both APIs.queryAssignedNodesvisitor refactored slightly so that it continues to work on legacy documentation examples.queryAssignedElementsvisitor refactored so it can be easily extended. It works almost exactly the same asqueryAssignedElementsbut withassignedNodesmethod and the generated selector modified.@queryAssignedElementsand@queryAssignedNodes.Testing
Manual testing screenshots on Lit.dev API
Screenshots showing the fixed
@queryAssignedElementsand@queryAssignedNodesgenerated API.