同じタイトルのページに対するサイドバーの挙動を修正#163
Merged
faithandbrave merged 1 commit intocpprefjp:masterfrom Jul 1, 2025
Merged
Conversation
サイドバーの要素を、重複のある IndexID ではなく、ページごとに独立な Index で管理するようにしました。
Member
|
ありがとうございます。マージします |
Member
|
デプロイ完了しましたー |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
発生している問題
開いているページと同じタイトルの別ページが(同じヘッダ内に)存在するとき、サイドバーでその別ページがアクティブになる問題があります。
例えば、
reference/chrono/duration/floorを開いたとき、サイドバーではreference/chrono/time_point/floorがアクティブになります。両方タイトルが
std::chrono::floorであり、両方<chrono>に含まれるため、この問題が発生します。「機能テストマクロ」、「更新された定義済みマクロ」については #127 で修正しましたが、それ以外に92件もの同様の問題を持つページ組が存在することがわかりました。
修正のための変更
サイドバーの要素は
IndexIDをキーとする連想配列で管理されていました。IndexIDはページのタイトル(名前空間::(クラス::)?タイトル)で決まるため、同じタイトルのページを区別することができませんでした。そこで、
IndexIDではなく、ページごとに独立なIndexをキーとするように変更することで問題を修正しました。この修正により #127 の変更は不要になったため削除しました。
付録
問題が発生するページ組の一覧