`@effect/ui-native` (Effect-TS/ui): `kit/Pan` nested inside a pressable ancestor never activates on move
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/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ệ
- react-native, typescript
- Lĩnh vực
- mobile
Hướng nghiên cứu
Bắt đầu với packages/ui-native/src/kit/Pan.ts quanh các dòng 296–300 và theo dõi cách mục tiêu chạm ban đầu được dùng trong các sự kiện di chuyển tiếp theo. So sánh hành vi với bài kiểm tra tái hiện được liên kết, 08-pan-inside-pressable-never-activates-on-move/repro.test.ts. Hoàn thành khi Pan lồng nhau được kích hoạt sau khi di chuyển vượt ngưỡng, hủy press của phần tử tổ tiên và phát pan cùng panEnd với độ dịch chuyển như mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
partially generated with help of my ai friend - neon 4.4
Hi effect team,
I was trying out this package and wanted to report some bugs encountered while porting a library to effect native
What version of Effect is running?
effect:4.1.7@effect/ui&@effect/ui-native:Effect-TS/uimainat77391ee50ae3d3175d670facbf675e9a819ba6a6react-native:0.88.1
What steps can reproduce the bug?
- Clone the minimal reproduction repository:
git clone https://github.com/cliffordfajardo/effectui-native-error-reproductions.git cd effectui-native-error-reproductions pnpm install pnpm vitest run 08-pan-inside-pressable-never-activates-on-move - Render a view with
Pan(axis: "x",threshold: 6) inside a parent view that has apressevent handler (for example, a draggable thumb inside a tap-to-seek track, or a swipe handle inside a pressable card). - Dispatch
topTouchStarton the childPannode, followed by a horizontaltopTouchMove(+24 px) andtopTouchEnd(see08-pan-inside-pressable-never-activates-on-move/repro.test.ts).
What is the expected behavior?
Dragging past threshold along the configured axis on the child Pan should activate Pan, cancel the ancestor press, and fire pan and panEnd (dx = 24), just as it does when the parent has no press handler.
What do you see instead?
Pan never activates and emits zero pan or panEnd events.
In packages/ui-native/src/kit/Pan.ts:296-300:
if (phase === 0) {
const press = pressed(n)
from = press ?? n
ask(n, press, payload)
} else if (owner === undefined) ask(from, undefined, payload)
On phase === 0 (topTouchStart), pressed(n) returns the ancestor pressable node press, so from is set to press rather than the actual touch target n. Because threshold > 0 (or axis is constrained), ready() is false at (dx = 0, dy = 0), so owner remains undefined. On subsequent phase === 1 (topTouchMove) events, ask(from, undefined, payload) walks upward starting from press (press -> press.parent -> ...) and never visits the descendant n again.
Additional information
Keeping from = n (the actual touch target) on phase === 0 so subsequent ask(from, ...) walks start from the child Pan node — while still passing press (or resolving pressed(n) when claiming) to cancel the ancestor pressable — allows nested Pan recognizers inside pressable ancestors to activate properly.
- Ngôn ngữ chính
- TypeScript
- Star
- 16.7k
- Fork
- 808
- Merge trung bình
- 21 giờ 22 phút
- Pull request đã merge (30 ngày)
- 486
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 Effect-TS/effect
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
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 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`@effect/ui-native` (Effect-TS/ui): `kit/VirtualList` `list` part widens `R` to `any`, poisoning enclosing componentsCó thể đã có người làm @effect-bot đã nhận hôm nay. Đang mở
Effect-TS/effect#11097 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`@effect/ui-native` (Effect-TS/ui): Controlled `input` rejected-edit restore never calls `host.commit()`Có thể đã có người làm @effect-bot đã nhận hôm nay. Đang mở
Effect-TS/effect#11096 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`@effect/ui-native` (Effect-TS/ui): `internal/focus.ts` `trackKeyboard` ignores `keyboardWillChangeFrame` / `keyboardDidChangeFrame` dismissalCó thể đã có người làm @effect-bot đã nhận hôm nay. Đang mở
Effect-TS/effect#11095 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Effect-TS/effect
Issue tương tự
-
check:failed streams:edit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
iptv-org/iptv#60585 · 1 bình luận ·
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 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Critical path skips a child span that ends exactly when the next one startsCó thể đã có người làm @Piyush4801 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jaegertracing/jaeger-ui#4865 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
anthropics/claude-code#112972 ·
-
Type: Improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày