Conversation
- mark要素にpointer-events: noneを追加してクリックイベントを親リンクに渡す - ライトモードとダークモードで適切な背景色を設定 - 検索システムのクリック不可バグを修正
- mark要素にpointer-events: noneを設定してクリックを親要素に渡す - すべての疑似要素(::before, ::after)を無効化 - ホバー時の背景を透明に設定 - ライトモード/ダークモードで適切なハイライト色を設定
- グローバルヘッダーをposition: fixedで画面上部に固定表示 - main-containerにpadding-top: 4remを追加してコンテンツが隠れないように調整 - 検索結果のz-indexを9999に変更して、他の要素より前面に表示 - グローバルスタイル(is:global)を使用して確実に適用
There was a problem hiding this comment.
Pull request overview
This pull request addresses critical search functionality bugs by fixing click interactions on search result highlights, removing unwanted hover effects, and correcting the global header position from displaying at the bottom to being fixed at the top.
Changes:
- Fixed header positioning by changing from
position: stickytoposition: fixedwith global styles and added padding-top to main-container - Implemented search result clickability through pointer-events manipulation on mark elements and link elements
- Removed pseudo-element visual artifacts and hover backgrounds from Pagefind UI components
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 12 comments.
| File | Description |
|---|---|
| src/layouts/DocsLayout.astro | Changed header from sticky to fixed positioning using global styles, added body margin/padding resets, and increased padding-top on main-container to accommodate fixed header |
| src/components/SearchBox.astro | Modified search results z-index to 9999, disabled pointer-events on all result children while selectively enabling for links, removed all pseudo-elements from Pagefind UI, and customized mark element highlighting with negative z-index |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add fixed position overlay for search results drawer - Control body scroll when search is active - Fix mobile sidebar z-index to appear above search results - Add Escape key to clear search - Header remains fixed at top during search
- Add 1024px breakpoint to reduce header-nav gap and font-size - Add 900px breakpoint for further size reduction before mobile mode - Prevents header menu items from being cut off at intermediate screen widths
- Limit pseudo-element hiding to :hover states only (comments 1,6,8) - Use pointer-events: none only on mark elements (comment 2) - Remove z-index: -1 to prevent background issues (comment 3) - Keep hover background for better usability (comment 4) - Remove duplicate z-index and position declarations (comment 7) - Minimize important flags to essential cases only (comment 11) - Fix z-index hierarchy: header(1000) < sidebar(1100) (comment 12)
- Restore essential !important flags for Pagefind reset override - Fix mobile sidebar theme/language toggle functionality - Add 900px breakpoint to switch to mobile menu earlier - Limit search box width at intermediate sizes - Hide GitHub link at 1024px for space optimization - Ensure header menu never overflows at any screen width
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
対応コミット: レビューコメントへの対応中のテストで発見した問題も修正しました: 問題: 中間幅(768px~1024px)でヘッダーメニュー項目が切れる 対応内容:
これにより、すべての画面幅でヘッダーメニューが適切に表示されるようになりました。 |
- Add CSS variable --header-height for consistent layout values - Fix MutationObserver memory leak by storing and disconnecting - Extract magic number (500ms) as PAGEFIND_INIT_DELAY_MS constant - Remove console.warn from production code - Lower search form z-index from 1001 to 999 (below header) - Remove redundant z-index declaration for .pagefind-ui__results - Update comment to reflect onclick behavior (direct assignment) - Use CSS variable for all header height references
…menu - Add global reference counting functions (lockBodyOverflow/unlockBodyOverflow) - Prevent conflicts when both search results and mobile menu are active - Use reference counting to safely manage body overflow from multiple components
…l site - Replace "Vivliostyle Docs" text with SVG logo image - Add vivliostyle.org link icon next to GitHub icon - Responsive sizing for logo (32px default, 28px/26px on smaller screens) - Language-specific links (ja: /ja/, en: /)
Commit d6bd7bf: ヘッダロゴのSVG化と公式サイトリンク追加変更内容:
効果:
コミット: d6bd7bf |
- 検索結果のブラウザ履歴管理機能を追加(戻るボタンで検索状態復元) - ダークモードでの検索結果スクロール問題を修正 - 検索結果からジャンプ時のヘッダー隠れ問題を修正(scroll-margin-top調整) - スクロールバー右側の余白問題を解消 - アコーディオンメニューの背景色・枠線問題を修正 - ヘッダー高さをすべてのテーマモードで統一(--header-height変数位置修正)
コミット 84b883b 概要fix: 検索機能のUI/UX改善
変更ファイル統計
修正ファイル:
主な改善内容
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 6 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add TypeScript type declarations for global functions - Prevent duplicate event listener registration for search input/clear - Prevent duplicate popstate event listener registration - Prevent duplicate click event listeners on sidebar links
- Fix search box placeholder text and icon positioning - Add search icon inside search box and adjust input padding - Use 'Reference' in both Japanese and English navigation - Set custom placeholder text based on language
|
ご指摘ありがとうございます。以下の修正を行いました: 1. グローバルヘッダーのナビゲーション (820f0f4)
2. 検索ボックスのプレースホルダーテキスト (984070c)
3. 検索アイコン(虫眼鏡)の配置 (820f0f4, 984070c)
|
- ThemeToggleのSVGにpointer-events: noneを追加 - header-actionsのCSS整理 - 検索ボックスの幅を固定(200px/150px) - レスポンシブ対応のメディアクエリ整理 問題点: - 検索窓がThemeToggleと言語スイッチを覆う問題が未解決 - タブレットモードでハンバーガーメニューが機能しない
… language switcher wrapping
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


概要
検索機能の重大なバグを修正しました:
修正内容
1. 検索結果のクリック可能化
問題: 検索結果のハイライト(
<mark>要素)がクリックイベントをブロックし、リンクをクリックできない修正:
mark要素にpointer-events: noneを設定pointer-events: autoとz-index: 2を設定pointer-events: noneを適用し、リンクのみを選択的に有効化2. ホバー時の黒いオブジェクトの除去
問題: 検索結果にマウスホバーすると、Pagefind UIのデフォルトスタイルにより黒い疑似要素が表示され、テキストが読めなくなる
修正:
::beforeと::after疑似要素を無効化3. グローバルヘッダーの位置修正
問題: グローバルヘッダーが画面下部に表示される
修正:
position: stickyからposition: fixedに変更left: 0、right: 0を追加して画面幅いっぱいに固定main-containerにpadding-top: 4remを追加してコンテンツがヘッダーの下に隠れないよう調整is:global)を使用して確実に適用z-indexを9999に変更してヘッダーより前面に表示変更ファイル
src/components/SearchBox.astrosrc/layouts/DocsLayout.astroテスト