DateField documentation page crashes with undefined `ariaLabel` in EditableSegment

Aperta
#1,655 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
2.5k
Fork
181
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Thinkmill/keystatic

Tutte le issue di Thinkmill/keystatic

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.