feat: support ion-infinite-scroll in a `flex-direction: column-reverse` scroll element
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 57/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- TypeScript
- Star
- 52.8k
- Fork
- 13.3k
- Merge trung bình
- 3 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 86
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ionic-team/ionic-framework
-
bug: input-otp, backspace in an empty box only moves focus instead of clearing the previous boxCó thể đã có người làm @sarankumar1325 đã nhận 23 ngày trước. Đang mởpackage: core type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
ionic-team/ionic-framework#31639 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: vue swipe cancellation throws when the previous page is missingCó thể đã có người làm @dandoingdev đã nhận 46 ngày trước. Đang mởpackage: vue type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ionic-team/ionic-framework#31514 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: ion-searchbar input is always labelled "search text"; aria-label on the host is not forwardedCó thể đã có người làm @HappyKnuckles đã nhận 41 ngày trước. Đang mởa11y package: core type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
ionic-team/ionic-framework#31492 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: IonTabs throws when a Fragment contains one IonRouterOutletCó thể đã có người làm @Benziza đã nhận 81 ngày trước. Đang mởpackage: react type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ionic-team/ionic-framework#31410 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: angular swipe-back gesture crashes in StackController.startBackTransition when the stack is popped before the gesture is capturedCó thể đã có người làm @officialasishkumar đã nhận 9 ngày trước. Đang mởpackage: angular type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
ionic-team/ionic-framework#31291 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ionic-team/ionic-framework
Issue tương tự
-
ready-for-ai
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
umbraco/Umbraco-CMS-MCP-Dev#647 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
HelloAOLab/seed-bible#2173 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
hocinehacherouf/liberarr#77 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
LibreChat-AI/LibreChat#18225 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
b-ber/build/epub b-ber/themes
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
triplecanopy/b-ber#790 ·
Maintainer thường phản hồi trong vòng 1 ngày