feat: Allow triggers and other references to be used inside shadow DOM of other WebComponent
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, typescript
Línea de trabajo
El issue no identifica archivos, pruebas ni puntos de entrada. Empieza por localizar las referencias de Ionic que actualmente llaman a document.getElementById(id) y, después, compara su comportamiento dentro de un shadow DOM con la búsqueda local y luego en el documento propuesta; se considera terminado cuando las referencias funcionan en ambos ámbitos sin romper las búsquedas existentes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
Make (Ionic) elements which refer to other (Ionic) elements be usable inside the shadow DOM of some other (non-Ionic) WebComponent.
Describe the Use Case
When using elements which have a reference to some other element (like a trigger or an <ion-datetime-button> referencing an <ion-datetime>) the search for the reference is always performed on the root document. I use these elements inside a shadow DOM of some other WebComponent. I would like these references to be searched within the shadow DOM first and if failing, be performed on the root document.
Describe Preferred Solution
No response
Describe Alternatives
No response
Related Code
Code wise this could probably be implemented without influencing existing code (except if you have the same identifier in your shadow DOM and your document root, but wondering if such a situation would be logical or only theoretical):
Every reference is searched using document.getElementById(id). If all these occurrences are replaced by a call to the following function getReferencedElement(this, id), it would try the local reference first.
function getReferencedElement(element, id) {
// Start searching within the elements shadow DOM or from document root
let rootNode = element.getRootNode();
let referencedElement = rootNode.getElementById(id);
if(referencedElement) {
return referencedElement;
}
// In case searched in shadow DOM (but did not find anything), search document root
if(rootNode !== document) {
return document.getElementById(id);
}
return null;
}
Above code is untested and meant to describe a general solution.
Additional Information
I'm happy to create a PR if this feature would be accepted for incorporation.
- Lenguaje dominante
- TypeScript
- Estrellas
- 52.8k
- Forks
- 13.3k
- Merge medio
- 3 d 1 h
- PR fusionados (30 d)
- 86
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ionic-team/ionic-framework
-
bug: input-otp, backspace in an empty box only moves focus instead of clearing the previous boxPosiblemente ocupada @sarankumar1325 la tomó hace 23 días. Abiertopackage: core type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
ionic-team/ionic-framework#31639 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug: vue swipe cancellation throws when the previous page is missingPosiblemente ocupada @dandoingdev la tomó hace 46 días. Abiertopackage: vue type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ionic-team/ionic-framework#31514 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug: ion-searchbar input is always labelled "search text"; aria-label on the host is not forwardedPosiblemente ocupada @HappyKnuckles la tomó hace 41 días. Abiertoa11y package: core type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
ionic-team/ionic-framework#31492 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug: IonTabs throws when a Fragment contains one IonRouterOutletPosiblemente ocupada @Benziza la tomó hace 82 días. Abiertopackage: react type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ionic-team/ionic-framework#31410 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug: angular swipe-back gesture crashes in StackController.startBackTransition when the stack is popped before the gesture is capturedPosiblemente ocupada @officialasishkumar la tomó hace 9 días. Abiertopackage: angular type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
ionic-team/ionic-framework#31291 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de ionic-team/ionic-framework
Issues similares
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
lingdojo/kana-dojo#34223 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
bug status: needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
mastra-ai/mastra#30587 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:web p2 product:business triage:active type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
cuadrao-ai/argus#2228 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
embedpdf/embed-pdf-viewer#1098 ·
Los mantenedores suelen responder en 1 día
-
.Needs Triage .Team/Metabot Priority:P3 Type:Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
metabase/metabase#87252 · 1 comentario ·
Los mantenedores suelen responder en 1 día