DateField documentation page crashes with undefined `ariaLabel` in EditableSegment

Abierto
#1,655 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
react, typescript
Área
frontend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
2.5k
Forks
181
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Thinkmill/keystatic

Todos los issues de Thinkmill/keystatic

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.