Links to a section of a page don't scroll to it
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- html, php
調査の方向性
まず app/Markdown/GithubFlavoredMarkdownConverter.php で見出しアンカーに content- プレフィックスが付与される仕組みを確認し、次にウェブサイトのページ読み込みと hashchange の処理箇所を探してください。サンプルページの #overview リンクを確認し、同じページ内および別ページのフラグメントが読み込み後にスクロールすることと、content- リンクが引き続き機能することを検証してください。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- PHP
- スター
- 3
- フォーク
- 11
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mage-os/devdocs-website のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
mage-os/devdocs-website#73 ·
-
Redirect removed and renamed pages対応中かも @DavidLambauer が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
mage-os/devdocs-website#72 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
mage-os/devdocs-website#71 ·
-
Create FAQs per Docオープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
mage-os/devdocs-website#57 · コメント 1 件 ·
-
enhancement good first issue help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
mage-os/devdocs-website#45 · コメント 1 件 ·
mage-os/devdocs-website の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
quantum-php/project#222 ·
-
support
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
15.0
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
mailcow/mailcow-dockerized#7717 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
mollie/WooCommerce#1346 ·