[Bug]: URI Text Fragments do not work with "Deep Dive" text blocks
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 11.8k
- Fork
- 7.9k
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 11
Mô tả
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
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu từ trang react.dev/reference/react/useCallback được liên kết và kiểm tra cách phần "Deep Dive" được render và mở trong quá trình điều hướng ban đầu. Tái hiện URL phân mảnh văn bản được cung cấp trong một lần tải trang mới, sau đó so sánh với việc thêm phân mảnh sau khi tải trang và mở phần này. Hoàn tất khi trình duyệt cuộn đến và làm nổi bật văn bản bên trong một phần "Deep Dive" đang thu gọn khi điều hướng trực tiếp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, react
- Lĩnh vực
- documentation, web-dev
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100