Skip to content

Commit b94ce30

Browse files
committed
fix: hide tooltips after pointer clicks
1 parent 1751a44 commit b94ce30

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
1313

1414
- **One-click old/new IL path handoff from HTML reports** — When `ShouldOutputILText=true`, each `ILMatch` / `ILMismatch` label in the `diff_report.html` Diff Detail column now has a distinct two-file button. It copies the quoted absolute old/new `*_IL.txt` paths for pasting into WinMerge, `diff`, or another text-based diff tool. The report embeds the IL output roots at generation time, so moving only the HTML file does not change the copied targets. The button uses the report's shared translucent fading tooltip, shows a brief check mark after a successful copy, and shows a red exclamation mark plus a browser alert if copying fails. The File Path copy action uses the same success/failure feedback. Affected: `Services/HtmlReportGenerateService.cs`, `Services/HtmlReport/HtmlReportGenerateService.Helpers.cs`, `Services/HtmlReport/HtmlReportGenerateService.Sections.cs`, `Services/HtmlReport/diff_report.css`, `Services/HtmlReport/js/diff_report_filter.js`, `Services/HtmlReport/js/diff_report_init.js`, `USER_GUIDE.md`, `doc/samples/diff_report.html`. Tests: `HtmlReportGenerateServiceTests`, `diff_report.test.js`.
1515

16+
#### Fixed
17+
18+
- **HTML report tooltips no longer remain visible after pointer clicks** — Replaced wrapper-wide focus tooltip activation with `:focus-visible` activation on the actual buttons. Moving the pointer away now hides a tooltip after clicking while keyboard focus continues to reveal it. Affected: `Services/HtmlReport/diff_report.css`, `doc/samples/diff_report.html`. Test: `HtmlReportGenerateServiceTests`.
19+
1620
### [1.20.6] - 2026-07-17
1721

1822
#### Fixed
@@ -1663,6 +1667,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
16631667

16641668
- **HTML レポートから新旧 IL パスをワンクリックで差分ツールへ引き渡し** — `ShouldOutputILText=true` の場合、`diff_report.html` の Diff Detail 列にある各 `ILMatch` / `ILMismatch` ラベルへ、用途を見分けられる2ファイル用ボタンを追加しました。WinMerge・`diff` などのテキストベース差分ツールへ貼り付けられる、引用符付きの新旧 `*_IL.txt` 絶対パスをコピーします。IL 出力ルートはレポート生成時に埋め込まれるため、HTML ファイルだけを移動してもコピーされる参照先は変わりません。ボタンはレポート共通の半透明フェード式ツールチップを使い、コピー成功時は短時間チェックマークを、失敗時は赤い感嘆符とブラウザー警告を表示します。File Path コピー操作にも同じ成功・失敗フィードバックを適用します。対象: `Services/HtmlReportGenerateService.cs`, `Services/HtmlReport/HtmlReportGenerateService.Helpers.cs`, `Services/HtmlReport/HtmlReportGenerateService.Sections.cs`, `Services/HtmlReport/diff_report.css`, `Services/HtmlReport/js/diff_report_filter.js`, `Services/HtmlReport/js/diff_report_init.js`, `USER_GUIDE.md`, `doc/samples/diff_report.html`。テスト: `HtmlReportGenerateServiceTests`, `diff_report.test.js`。
16651669

1670+
#### 修正
1671+
1672+
- **マウス操作後に HTML レポートのツールチップが残り続ける問題を修正** — ラッパー全体のフォーカスによる表示を廃止し、実際のボタンに対する `:focus-visible` 表示へ変更しました。クリック後にマウスを外すとツールチップが消え、キーボードフォーカス時は引き続き表示されます。対象: `Services/HtmlReport/diff_report.css`, `doc/samples/diff_report.html`。テスト: `HtmlReportGenerateServiceTests`。
1673+
16661674
### [1.20.6] - 2026-07-17
16671675

16681676
#### 修正

FolderDiffIL4DotNet.Tests/Services/HtmlReportGenerateServiceTests.SortAndResources.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ public void GenerateDiffReportHtml_ILRows_HaveDistinctOldNewIlPathCopyButtons()
147147
Assert.Contains("background: color-mix(in srgb, var(--color-surface) 60%, transparent);", html);
148148
Assert.Contains("font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;", html);
149149
Assert.Contains(".btn-tooltip-wrap:hover > .btn-tooltip", html);
150+
Assert.Contains(".btn-tooltip-wrap > .btn:focus-visible + .btn-tooltip", html);
151+
Assert.Contains(".btn-tooltip-wrap > .btn-copy-path:focus-visible + .btn-tooltip", html);
152+
Assert.DoesNotContain(".btn-tooltip-wrap:focus-within > .btn-tooltip", html);
150153
Assert.DoesNotContain("btn-tooltip-visible", html);
151154
Assert.DoesNotContain("copy-toast", html);
152155
}

Services/HtmlReport/diff_report.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,8 @@
897897
opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease;
898898
}
899899
.btn-tooltip-wrap:hover > .btn-tooltip,
900-
.btn-tooltip-wrap:focus-within > .btn-tooltip {
900+
.btn-tooltip-wrap > .btn:focus-visible + .btn-tooltip,
901+
.btn-tooltip-wrap > .btn-copy-path:focus-visible + .btn-tooltip {
901902
opacity: 1; transform: translateX(-50%) translateY(0);
902903
}
903904
@media (prefers-reduced-motion: reduce) {

doc/samples/diff_report.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,8 @@
795795
opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease;
796796
}
797797
.btn-tooltip-wrap:hover > .btn-tooltip,
798-
.btn-tooltip-wrap:focus-within > .btn-tooltip {
798+
.btn-tooltip-wrap > .btn:focus-visible + .btn-tooltip,
799+
.btn-tooltip-wrap > .btn-copy-path:focus-visible + .btn-tooltip {
799800
opacity: 1; transform: translateX(-50%) translateY(0);
800801
}
801802
@media (prefers-reduced-motion: reduce) {

0 commit comments

Comments
 (0)