DateField documentation page crashes with undefined `ariaLabel` in EditableSegment

オープン
#1,655 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
react, typescript
領域
frontend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
2.5k
フォーク
181
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Thinkmill/keystatic のほかの issue

Thinkmill/keystatic の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。