Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Snackbar can display wrong message during hiding animation

Đang mở
#653 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ả

bug seam components

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của seamapi/react

Tất cả issue của seamapi/react

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.