Stackflow transition breaks when activity suspends longer than transitionDuration
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu bằng cách theo dõi trạng thái chuyển tiếp và luồng đăng ký giữa @stackflow/core và @stackflow/react, sử dụng trình tự trong issue này và issue liên quan #434 làm ngữ cảnh. Xác định cách trạng thái pending và hành động post-render tương tác với các Activities bị suspend. Được xem là hoàn tất khi lần render ban đầu không thể bỏ qua enter transition nếu suspension kéo dài hơn transitionDuration, và hành vi này được bao phủ bởi các bài test hiện có liên quan.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Currently, Stackflow activities' enter transition is only expressed with enter-active and enter-done. However, this doesn't work well with frameworks that do concurrent rendering because the core state update happens regardless of whether activities render synchronously or suspend during render. This results in something like this:
sequenceDiagram
participant Core as @stackflow/core
participant Integration as Integration (@stackflow/react)
participant View
View->>Core: push()
activate Core
note left of Core: Transition
Core->>Integration: notify on subscribe() listener
Integration->>Core: getStack()
Core->>Integration: State with `enter-active`
Integration->>View: Render new activity with `enter-active`
activate View
note right of View: Suspend
Core->>Integration: notify on subscribe() listener
deactivate Core
Integration->>Core: getStack()
Core->>Integration: State with `enter-done`
Integration->>View: Rerender with `enter-done`
deactivate View
note right of View: Initial render with `enter-done`
As described above, if the view suspends longer than the core transition, the initial render of the view is done with enter-done state, resulting in broken CSS transitions.
To mitigate this, the core transition should be started after confirming that the initial view was rendered. These are the required parts to implement the feature:
- Add a new transition state to express activities that didn't complete the initial render. (
enter-pending?) - Add a new action that notifies the core after completing the initial render. (no idea about naming 🥲)
I'm willing to implement the feature after the direction is fixed.
Related: #434
- Ngôn ngữ chính
- TypeScript
- Star
- 1k
- Fork
- 114
- Merge trung bình
- 59 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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 daangn/stackflow
-
스와이프 백 애니메이션 덜컥임 이슈Có thể làm lại được @Shennng đã nhận 220 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Vue3 지원 계획Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
다른 호스트로 이동해야할 때 처리에 관하여Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
Tất cả issue của daangn/stackflow
Issue tương tự
-
Create/import wallet form shows raw "password must be at least 1 characters" instead of the translated messageCó thể đã có người làm @CapThunder19 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
joinmarket-webui/jam#1538 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
t0ggles
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nolimits4web/swiper#8240 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/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 72/100
modelcontextprotocol/inspector#2723 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status:approved type:bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
egdev6/quorb#109 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày