fix(jira-knowledge): replace hover tooltip with click-based popup for help button

Native Qt tooltips on macOS are unreliable (delayed or invisible). Replace
with a QFrame popup that appears on click, positioned below the ? button,
and closes when clicking elsewhere (Qt.Popup flag handles ESC and outside-click).

- Store help text in self._help_text instead of setToolTip()
- Add _toggle_help_popup() method: creates/destroys floating QFrame
- Update test to check _help_text attribute instead of toolTip()

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
thanhnv
2026-09-08 10:08:15 +09:00
co-authored by Claude Opus 5
parent 42f4a058ea
commit 0cb6035863
2 changed files with 55 additions and 17 deletions
+6 -5
View File
@@ -51,15 +51,16 @@ def test_help_icon_exists(dialog):
def test_help_icon_has_tooltip(dialog):
"""Help icon must have a non-empty tooltip with both Project ID and Jira Key explanations."""
"""Help icon must store help text with both Project ID and Jira Key explanations."""
from PySide6.QtWidgets import QToolButton
dlg = dialog
help_icons = dlg.findChildren(QToolButton)
assert help_icons, "No help button found"
tooltip = help_icons[0].toolTip()
assert tooltip, "Help button has no tooltip"
assert "Project ID" in tooltip, "Tooltip missing Project ID explanation"
assert "Jira Key" in tooltip, "Tooltip missing Jira Key explanation"
# Help text is stored in _help_text for click-based popup
help_text = getattr(dlg, '_help_text', '') or help_icons[0].toolTip()
assert help_text, "Help button has no help content"
assert "Project ID" in help_text, "Help content missing Project ID explanation"
assert "Jira Key" in help_text, "Help content missing Jira Key explanation"
# ---- Help text content ----------------------------------------------------