Drop the assistant's ⋯ menu; hiding is a right-click
Its two entries were "Thu nhỏ", which the − button immediately to its left already does, and "Ẩn vào cạnh phải". A drop-list whose real content is one action, half of it duplicating its neighbour, is chrome — removed at the user's request. Nothing became unreachable: collapsing is the − button and the dot itself, hiding is a right-click on the dot (already there, and named in its tooltip) or now on the open panel's header too. This is a deliberate deviation from the audit page, which asks for "'Ẩn trợ lý' dời vào menu ⋯". check_design_parity records it as that rather than quietly scoring it done — the item is relabelled and its detail says where the action went. check_help_dock stopped reading the menu's contents and now exercises the routes: − collapses, the dot carries a context menu, hide reaches the edge. 24/24 checkers pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
c4e9158779
commit
7a856aacaf
@@ -100,12 +100,27 @@ def main() -> int:
|
||||
fails.append(f"tab mep {dock.width()}px, van duoi 24px")
|
||||
dock._show_launcher()
|
||||
|
||||
# Nothing removed: "hide to the edge" is in the ⋯ menu now.
|
||||
items = [a.text() for a in dock.more_btn.menu().actions()]
|
||||
print(f"menu ⋯ : {items}")
|
||||
for key in ("help_agent.collapse_tooltip", "help_agent.hide_tooltip"):
|
||||
if tr(key) not in items:
|
||||
fails.append(f"menu thieu muc {tr(key)}")
|
||||
# The ⋯ menu is gone (user's call — its two entries were "collapse", which
|
||||
# the − button beside it already did, and "hide"). Nothing was lost with it:
|
||||
# collapse is the − button and the dot, hide is a right-click on either the
|
||||
# dot or the open panel's header. Check the routes, not the menu.
|
||||
from PySide6.QtCore import Qt as _Qt
|
||||
|
||||
if hasattr(dock, "more_btn"):
|
||||
fails.append("menu ⋯ van con tren panel")
|
||||
dock._collapse()
|
||||
app.processEvents()
|
||||
if dock._state != "launcher":
|
||||
fails.append("nut − khong thu nho duoc ve cham")
|
||||
if dock.launcher.contextMenuPolicy() != _Qt.CustomContextMenu:
|
||||
fails.append("cham khong co menu chuot phai de an")
|
||||
dock._hide_to_edge()
|
||||
app.processEvents()
|
||||
if dock._state != "hidden":
|
||||
fails.append("khong an duoc vao canh phai")
|
||||
print(f"thu nho + an : ca hai duong deu chay (trang thai cuoi={dock._state!r})")
|
||||
dock._show_launcher()
|
||||
app.processEvents()
|
||||
print(f"nut thu nho : {dock.min_btn.toolTip()!r}")
|
||||
print(f"nut gui / o nhap: {dock.send_btn is not None} / {dock.input is not None}")
|
||||
|
||||
@@ -113,9 +128,11 @@ def main() -> int:
|
||||
for lang in ("vi", "en", "ja"):
|
||||
set_language(lang)
|
||||
dock.retranslate()
|
||||
# more_tooltip went with the ⋯ menu; dot_hint replaces it as the
|
||||
# string that tells you the right-click is there.
|
||||
vals = [dock.launcher.toolTip(), tr("help_agent.badge"),
|
||||
tr("help_agent.more_tooltip")]
|
||||
print(f" {lang}: badge={vals[1]!r} more={vals[2]!r}")
|
||||
tr("help_agent.dot_hint")]
|
||||
print(f" {lang}: badge={vals[1]!r} goi y chuot phai={vals[2]!r}")
|
||||
if any(not v or v.startswith("help_agent.") for v in vals):
|
||||
fails.append(f"thieu ban dich cho {lang}")
|
||||
set_language("vi")
|
||||
|
||||
Reference in New Issue
Block a user