DateField documentation page crashes with undefined `ariaLabel` in EditableSegment

Đang mở
#1,655 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Start with InputSegment.tsx and useDateSegment.ts, especially the EditableSegment destructuring and the hookData.get(...) call mentioned in the report. Reproduce the exception on the DateField documentation page and trace why that lookup returns undefined; the script-tag warning may be related, but the issue does not confirm that. Done when the page renders without the runtime exception.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Description

I encountered a runtime error while accessing the DateField documentation page.

Affected page:
https://keystar.design/package/date-time/date-field

Steps to reproduce
  1. Start the documentation project locally.
  2. Navigate to the DateField documentation page.
  3. Observe the browser console.
Actual behavior

The following warning appears:

Encountered a script tag while rendering React component.
Scripts inside React components are never executed when rendering on the client.
Consider using template tag instead.

This is followed by a runtime exception:

useDateSegment.ts:52

Uncaught TypeError:
Cannot destructure property 'ariaLabel' of
hookData.get(...) as it is undefined.

at EditableSegment (InputSegment.tsx:54:40)
Expected behavior

The DateField documentation page should render without runtime exceptions.

Additional information
  • Reproduced locally.
  • The exception originates in EditableSegment in InputSegment.tsx.
  • The hookData.get(...) call in useDateSegment.ts returns undefined, causing destructuring to fail.
  • The relationship between the script-tag warning and the runtime exception is not yet confirmed.

I would like to investigate and work on a fix if this issue is not already being addressed.

Ngôn ngữ chính
TypeScript
Star
2.5k
Fork
181
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

  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 Thinkmill/keystatic

Tất cả issue của Thinkmill/keystatic

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.