Links to a section of a page don't scroll to it
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- html, php
- Lĩnh vực
- documentation, frontend
Hướng nghiên cứu
Bắt đầu với app/Markdown/GithubFlavoredMarkdownConverter.php để xem các anchor tiêu đề nhận tiền tố content- như thế nào, rồi tìm phần xử lý tải trang và hashchange của website. Kiểm tra liên kết #overview của trang ví dụ và xác minh rằng các fragment trên cùng trang và trên trang khác sẽ cuộn đến vị trí tương ứng sau khi tải, trong khi các liên kết content- vẫn hoạt động.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A link to a section of a page opens the page but doesn't scroll to the section.
Why
The docs pages link to sections the way GitHub renders them: [text](#overview) or [text](/docs/{{version}}/rest-apis#errors). The website gives every heading an anchor with a content- prefix (heading_permalink in app/Markdown/GithubFlavoredMarkdownConverter.php), so the page has id="content-overview" and no id="overview".
Example
https://devdocs.mage-os.org/docs/main/integration-testing starts with a list of links such as #overview. Clicking one changes the URL and nothing else.
Scope
maintoday: 49 such links on 3 pages (integration-testing,events,javascript-in-magento-2).- With the open pull requests in mage-os/devdocs merged: 16 links on 13 pages, 6 of them to a section of another page.
The table of contents and the heading permalinks are generated with the prefix and work.
Proposal
Keep the pages as they are, since their links also work on GitHub, and let the website resolve them: when the fragment of the URL matches no element, scroll to the element with the content- prefix instead, on page load and on hashchange.
Done when
-
[text](#section)scrolls to the section. - A link to a section of another page scrolls to it after the page has loaded.
- Links with the
content-prefix keep working.
- Ngôn ngữ chính
- PHP
- Star
- 3
- Fork
- 11
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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.
Issue khác của mage-os/devdocs-website
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
mage-os/devdocs-website#73 ·
-
Redirect removed and renamed pagesCó thể đã có người làm @DavidLambauer đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
mage-os/devdocs-website#72 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
mage-os/devdocs-website#71 ·
-
Create FAQs per DocĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
mage-os/devdocs-website#57 · 1 bình luận ·
-
enhancement good first issue help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
mage-os/devdocs-website#45 · 1 bình luận ·
Tất cả issue của mage-os/devdocs-website
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
quantum-php/project#222 ·
-
support
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
15.0
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
mailcow/mailcow-dockerized#7717 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
mollie/WooCommerce#1346 ·