The ESC menu's Support rung opens the help window (#1807)

The ESC menu's Support rung was greyed with nothing behind it. The 1.15 era menu that the layer's ladder follows opens the help window from Support. In 1.12 that window is the stock `HelpFrame`, opened by the "?" micro button's `ToggleHelpFrame()` (`MainMenuBarMicroButtons.xml:217`).

Support is now live: it plays the menu click, closes the menu as the Macros rung does, and toggles the help window. Edit Mode stays greyed.

Test: `support_closes_the_menu_and_toggles_the_help_window` clicks the rung and checks the toggle and the closed menu; the live-entries test now lists Support.

Fixes #1800

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit bb434a181f6a3815ec6fe3e5ace89c864fa1808c)

Absorbed into the octo fork. Ported by hand: upstream wires Support in GameMenuAdapters.xml, a Lua adapter layered over stock FrameXML that this fork does not carry — our menu declares its own rungs in GameMenuFrame.xml, where GameMenuButtonSupport was GameMenuButton_Pending (SetText + Disable). It now sets its text on load and, on click, plays igMainMenuOption, hides the menu as the Macros rung does and calls ToggleHelpFrame(). Our rungs carry no Benilla prefix, so upstream's test names are retargeted; our own narrowing_the_frame_keeps_the_button_column_centred test is kept. The 6 FloatingChatFrame failures in this module are pre-existing baseline (10 passed/6 failed before, 11/6 after).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn
This commit is contained in:
Sam Sung
2026-10-25 23:18:06 -06:00
committed by grom
co-authored by Claude Opus 5
parent f83533b2a6
commit 0c247396b7
2 changed files with 35 additions and 9 deletions
+11 -1
View File
@@ -138,7 +138,17 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="GameMenuButtonEditMode" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>GameMenuButton_Pending(self, GAMEMENU_SUPPORT)</OnLoad></Scripts>
<!-- The era's Support opens the help window, which 1.12 opens from its "?"
micro button (`MainMenuBarMicroButtons.xml:217`); the menu closes first, as
the Macros rung below does. -->
<Scripts>
<OnLoad>self:SetText(GAMEMENU_SUPPORT)</OnLoad>
<OnClick>
PlaySound("igMainMenuOption")
HideUIPanel(getglobal("GameMenuFrame"))
ToggleHelpFrame()
</OnClick>
</Scripts>
</Button>
<Button name="GameMenuButtonMacros" inherits="GameMenuButtonTemplate" text="MACROS">
<Anchors>
@@ -150,21 +150,37 @@ fn narrowing_the_frame_keeps_the_button_column_centred() {
assert!(s.errors().is_empty(), "script errors: {:?}", s.errors());
}
/// Support closes the menu and toggles the stock help window, as the "?" micro button does
/// (`MainMenuBarMicroButtons.xml:217`).
#[test]
fn the_unbacked_entries_are_disabled_and_the_rest_are_live() {
fn support_closes_the_menu_and_toggles_the_help_window() {
let _data = benilla_formats::wow_data_or_skip!();
let s = harness();
s.run("HELP_TOGGLES = 0; function ToggleHelpFrame() HELP_TOGGLES = HELP_TOGGLES + 1 end")
.unwrap();
s.run("ShowUIPanel(GameMenuFrame); GameMenuButtonSupport:Click()")
.unwrap();
assert_eq!(s.eval::<i64>("return HELP_TOGGLES").unwrap(), 1);
assert!(!s
.eval::<bool>("return GameMenuFrame:IsVisible() == 1")
.unwrap());
assert!(s.errors().is_empty(), "script errors: {:?}", s.errors());
}
#[test]
fn the_unbacked_entry_is_disabled_and_the_rest_are_live() {
let _data = benilla_formats::wow_data_or_skip!();
let s = harness();
s.run("ShowUIPanel(GameMenuFrame)").unwrap();
for name in ["GameMenuButtonEditMode", "GameMenuButtonSupport"] {
assert!(
!s.eval::<bool>(&format!("return {name}:IsEnabled() ~= 0"))
.unwrap(),
"{name} has no panel behind it and must read that way"
);
}
assert!(
!s.eval::<bool>("return GameMenuButtonEditMode:IsEnabled() ~= 0")
.unwrap(),
"Edit Mode has no panel behind it and must read that way"
);
for name in [
"GameMenuButtonOptions",
"GameMenuButtonSupport",
"GameMenuButtonMacros",
"GameMenuButtonLogout",
"GameMenuButtonQuit",