feat: add base elements $$find and $$findAll methods#3741
feat: add base elements $$find and $$findAll methods#3741
Conversation
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Files with Diff Coverage (22) 🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
There was a problem hiding this comment.
Pull request overview
Adds $$find / $$findAll lookup helpers to base ESL component APIs and migrates existing components to use them instead of importing ESLTraversingQuery directly.
Changes:
- Extend
ESLBaseComponentand implement$$find/$$findAllinESLBaseElementandESLMixinElement - Replace direct
ESLTraversingQuery.first/allusage across multiple components/mixins with the new helpers - Document the new helpers in base-element and mixin-element READMEs
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-playground/src/core/base/plugin.ts | Switch $root resolution to $$find |
| packages/esl/src/esl-utils/abstract/component.ts | Add $$find / $$findAll to base component interface |
| packages/esl/src/esl-trigger/core/esl-trigger.ts | Use $$find for target resolution |
| packages/esl/src/esl-trigger/core/esl-base-trigger.ts | Use $$find for active class target resolution |
| packages/esl/src/esl-share/core/esl-share.ts | Use $$find for container lookup |
| packages/esl/src/esl-scrollbar/core/esl-scrollbar.ts | Use $$find for scrollbar target lookup |
| packages/esl/src/esl-related-target/core/esl-related-target.ts | Use $$findAll for related targets lookup |
| packages/esl/src/esl-popup/core/esl-popup.ts | Use $$find for container lookup |
| packages/esl/src/esl-panel-group/core/esl-panel-group.ts | Use $$find for mode class target lookup |
| packages/esl/src/esl-mixin-element/ui/esl-mixin-element.ts | Implement $$find / $$findAll on mixin base |
| packages/esl/src/esl-mixin-element/README.md | Document $$find / $$findAll on mixins |
| packages/esl/src/esl-media/core/esl-media.ts | Use $$find for marker/class targets |
| packages/esl/src/esl-media/control/esl-media-control-mixin.ts | Use $$find for media target lookup |
| packages/esl/src/esl-line-clamp/core/esl-line-clamp-toggler.ts | Use $$find for target lookup; minor boolean simplification |
| packages/esl/src/esl-image/core/esl-image.ts | Use $$find for container class target lookup |
| packages/esl/src/esl-footnotes/core/esl-note.ts | Use $$find for container lookup |
| packages/esl/src/esl-footnotes/core/esl-footnotes.ts | Use $$find for scope element lookup |
| packages/esl/src/esl-carousel/plugin/relation/esl-carousel.relation.mixin.ts | Use $$find for related carousel lookup |
| packages/esl/src/esl-carousel/plugin/nav/esl-carousel.nav.mixin.ts | Use $$find for carousel lookup |
| packages/esl/src/esl-carousel/plugin/info/esl-carousel.info.ts | Use $$find for carousel lookup |
| packages/esl/src/esl-carousel/plugin/dots/esl-carousel.nav.dots.ts | Use $$find for carousel lookup |
| packages/esl/src/esl-carousel/plugin/autoplay/esl-carousel.autoplay.mixin.ts | Use $$findAll / $$find for control/scope/blocker lookups |
| packages/esl/src/esl-carousel/core/esl-carousel.ts | Use $$find for container lookup |
| packages/esl/src/esl-base-element/core/esl-base-element.ts | Implement $$find / $$findAll on custom element base |
| packages/esl/src/esl-base-element/README.md | Document $$find / $$findAll on base elements |
| packages/esl/src/esl-animate/core/esl-animate.ts | Use $$findAll for targets lookup |
| packages/esl/src/esl-alert/core/esl-alert.ts | Use $$find for alert target resolution |
| packages/esl-website/src/navigation/header/header-search.ts | Use $$find for focus element lookup |
| packages/esl-website/src/esl-popup/esl-d-popup-game.ts | Use $$find for trigger lookup; return null when absent |
| packages/esl-website/src/autofocus/autofocus-mixin.ts | Use $$find for autofocus target lookup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

No description provided.