Bug 472785

Summary: Properly deal with nested Actions in MenuDialog
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Jack Hill <jackhill3103>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: nate, notmart
Priority: NOR    
Version First Reported In: 5.108.0   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jack Hill 2023-07-29 22:06:55 UTC
SUMMARY
Kirigami.MenuDialog does not know how to handle nested actions. Clicking these actions currently does nothing.

STEPS TO REPRODUCE
1. Compile the following code and run it:

Controls.Button {
    text: "Open Menu"
    onClicked: testMenu.open()
}

Kirigami.Action {
    id: mainAction
    text: "Top Level"
    Kirigami.Action {
        text: "Sub1"
    }
    Kirigami.Action {
        text: "Sub2"
    }
}

Kirigami.MenuDialog {
    id: testMenu
    actions: [mainAction]
}

2. Click the button "Open Menu"
3. Click the menu item "Top Level"

OBSERVED RESULT
Nothing happens

EXPECTED RESULT
The menu should update to show the nested actions in the list. This could be implemented like a page stack where the old actions animate off-screen to the left and the new actions appear from the right.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230724
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Kernel Version: 6.4.4-1-default (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION