Snackbar can display wrong message during hiding animation
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
- 35/100
- Loại issue
- Lỗi
- Độ 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
Start at the Snackbar component and inspect how AccessCodeTable and other consumers couple message with isVisible. Trace the hiding animation and the proposed null-to-non-null transition, then verify that the old message remains visible while hiding and that a rapid new message aborts the animation without showing the default message.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
The snackbar component uses the message: string prop to determine what to display and the isVisible: boolean prop to determine if it should be visible.
Some components that use the Snackbar component coupled these two props so that isVisible becomes false at the same time as message goes back to the default messaging. (like the AccessCodeTable used to)
isVisible switching from true to false triggers the hiding animation, if the message prop changes to the default message at the same time then the default message gets displayed for the duration of the hiding animation.
Potential solution
The snackbar does not need that many props imo, we could change message: string to message: string | null and get rid of the isVisible prop.
The parent component would simply set the message to whatever it wants to display then nullify it when it wants to hide it. The snackbar would keep its own messageToDisplay: string state that does not get updated when the given message prop is null
We would need to make sure that setting the message to null then to a non-null value in quick succession properly aborts the hiding animation
- Ngôn ngữ chính
- TypeScript
- Star
- 9
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 seamapi/react
-
bug seam components
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
-
seam components
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
-
Return null vs false vs <></> Đang mởseam components
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
seam components
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
-
seam components
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
Tất cả issue của seamapi/react
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/inspector#2458 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
carbon-design-system/ibm-products#9907 ·