feat: support ion-infinite-scroll in a `flex-direction: column-reverse` scroll element
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
- 57/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- frontend
Línea de trabajo
Start with core/src/components/infinite-scroll/infinite-scroll.tsx, especially the distance calculation at lines 121–129 and the scrollTop writes in connectedCallback and complete(). Reproduce the report with a column-reverse scroll element and check both position values against the stated threshold behavior. Done means the event fires once within the threshold at the trigger in either direction, and the initial and completion scroll positions remain in range.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Ionic Framework Version
v9.x (9.0.7)
Current Behavior
A chat-style page lays the scroll element out bottom-up with ion-content::part(scroll) { display: flex; flex-direction: column-reverse; } so that the newest row sits at the bottom and the scroller starts there. In that layout the browser's scrollTop is 0 at the bottom and goes negative towards the top ([-320, 0] in the reproduction).
ion-infinite-scroll computes its distance as if scrollTop were non-negative (core/src/components/infinite-scroll/infinite-scroll.tsx L121–129):
const distanceFromInfinite =
this.position === 'bottom'
? scrollHeight - infiniteHeight - scrollTop - threshold - height
: scrollTop - infiniteHeight - threshold;
With the trigger placed at the oldest end of the list (the last DOM child, painted at the top) and threshold="100px":
| position | what happens |
|---|---|
top |
ionInfinite fires on the very first scroll step, 315 px away from the oldest end, and again on every later step (7 of 7 steps fired) |
bottom |
never fires, including at scrollTop = -320, i.e. with the trigger fully on screen at the oldest end |
Scroller in the reproduction: scrollHeight 1164, clientHeight 844, so the whole scrollable range is 320 px.
connectedCallback (L96–101) and complete() (L184–200) also write scrollEl.scrollTop = scrollHeight - clientHeight / scrollHeight - prev for position="top", which are positions outside the [-320, 0] range of a column-reverse scroller.
Expected Behavior
The trigger fires once when the user is within threshold of the trigger element, whichever direction the scroll element grows in.
Steps to Reproduce
<ion-content>with the style above, 60 rows of 48 px, and<ion-infinite-scroll position="top" threshold="100px">as the last child (so it paints at the top).- Listen to
ionInfinite, callcomplete()in the handler, and setscrollTopto-5,-20,-60, … on the scroll element returned bygetScrollElement(). - Observe one
ionInfiniteper step. Switch toposition="bottom"and scroll all the way up: no event.
Ionic Info
@ionic/core 9.0.7, Chromium 142 (Playwright headless).
- 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
-
ready-for-ai
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
umbraco/Umbraco-CMS-MCP-Dev#647 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
HelloAOLab/seed-bible#2173 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
hocinehacherouf/liberarr#77 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
LibreChat-AI/LibreChat#18225 ·
Los mantenedores suelen responder en 1 día
-
b-ber/build/epub b-ber/themes
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
triplecanopy/b-ber#790 ·
Los mantenedores suelen responder en 1 día