reactjs / reactjs/react.dev

[Bug]: URI Text Fragments do not work with "Deep Dive" text blocks

Abierto
#7,686 1 comentario 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug: unconfirmed
Lenguaje dominante
JavaScript
Estrellas
11.8k
Forks
7.9k
Merge medio
1 d 11 h
PR fusionados (30 d)
11

Descripción

Summary

Clicking a doc link that includes a Text Fragment does not scroll nor highlight the relevant text, if that text happens to be inside a "Deep Dive" section.

Page

https://react.dev/reference/react/useCallback#:~:text=Caching%20a%20function%20with,in%20other%20cases

Details

When attempting to quote a part of the doc that is under a "Deep Dive" section, with a URI text fragment: clicking the link will open the documentation page in the browser, but without scrolling to the relevant block nor highlighting the quoted part of the documentation.

However, there are two cases the highlighting works. Both of those require the page to already be loaded, the fragment is added to the uri of the page:

  • If the section is not opened beforehand: the browser still does not scrolls to the section nor open it, but the text is correctly highlighted.
  • If the section is opened beforehand: the browser scrolls to the section and highlights the text as expected

Here's a video capture of the problem:

https://github.com/user-attachments/assets/989e0a8c-2729-4072-aeca-ded2ac7d5c72

Guía de contribución

Abrir la guía de contribución

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.

Línea de trabajo

Comienza desde la página vinculada react.dev/reference/react/useCallback e inspecciona cómo se renderiza y se abre la sección "Deep Dive" durante la navegación inicial. Reproduce la URL de fragmento de texto proporcionada en una carga de página nueva y compárala con añadir el fragmento después de cargar y abrir la sección. La tarea está terminada cuando el navegador se desplaza hasta texto dentro de una sección "Deep Dive" contraída y lo resalta durante la navegación directa.

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

Evaluación

Stack tecnológico
javascript, react
Área
documentation, web-dev
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.