Support intersection/clipping detection in overlay positioning
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
#### What are you trying to do?
I am trying to set a position strategy that works when origin element is clipped. Is there any way to do this without writing a custom position strategy?
#### What troubleshooting steps have you tried?
I tried all the strategies available through CDK Api but without success.
#### Reproduction
https://stackblitz.com/edit/angular-rplbez
Basically, i have to 2 connected positions defined. First that will center the overlay below origin element and another one that will center the overlay above origin element. For example, if element is on the top of the page, overlay would go out of viewport and then second position will be used (below origin element). That works fine. But if origin element is clipped (as in stackblitz example) then overlay will be positioned using first position (above origin element).
Steps to reproduce:
1. Click on a blue square
2. Opened popover is over red header
#### Environment
- Angular: 10.0.9
- CDK/Material: 10.1.3
- Browser(s): Chrome 84.0
- Operating System (e.g. Windows, macOS, Ubuntu): MacOS 10.15.3
Guía de contribución
Línea de trabajo
Comienza con la reproducción vinculada de StackBlitz e inspecciona el comportamiento de posicionamiento del overlay de CDK para las dos posiciones conectadas. Reproduce el caso del origen recortado y, después, verifica que la detección de intersecciones o recortes seleccione la posición alternativa, preservando al mismo tiempo el comportamiento de fallback del viewport existente.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100