Feat(ActionGroup): Added Action Groups#295
Conversation
…onChooser - Added groups to the PluginBase that can be added with `add_action_group` - Added a new Expander to the ActionChooser called ActionGroupExpander - Added some Styling to the UI elements
- Swapped from adding css_classes in the Constructor to add them via method which fixes the weird styling from before
- All nested expanders now have a black border at the bottom - The last expander has a bigger border at the bottom to seperate it from the normal items
|
Nice work! The only problem I noticed is that the arrow on the right hand side always shows the "open state". Idk how if that's really fixable, as expanders inside expanders behave a bit strange. |
- Moved it into the Header to create a cleaner UI - Added application-x-addon-symbolic.svg as this represents addons and fits perfectly
Jup thats something to take a look at Searching is also something that needs to be reworked. Currently you get errors because the Expander dont contain a label |
|
@Core447 do you maybe know how to remove the arrow? |
|
Tbh I don't really like the new position of the store button, as it's not directly clear what it does. Also with the old one at the bottom, if a user searches through the actions from the top to the bottom and doesn't find anything, he'll see the open store button right away when he needs it. |
|
Ah yeah that makes sense But we can ofc move it back to the bottom |
…xpander - OpenStore Button got moved back down - Added a folder Icon to make it a little clearer what it does
|
@Core447 we need to add the Function back that disables the Action if its unsupported/untested |
- Instead of a Dict now we use a set of ActionHolderGroups - Added a little bit more params to ActionHolderGroups - Made PluginExpander and ActionGroupExpander inherit from ActionChooserExpander as they share alot of the same functionality
|
ActionHolderGroups now get defined like this in main: self.group_1 = ActionHolderGroup("C-D", action_holders=[self.e, self.f], hide_on_group_support=False, group_support={Input.Key: ActionInputSupport.SUPPORTED})
self.add_action_holder_group(self.group_1)hide_on_group_support and group_support is optional |
- You can now add ActionHolder, EventHolder and ActionHolderGroup in Lists by using the provided methods
|
@G4PLS I changed it so that the groups keep getting shown, even if no action is compatible, so that users can still see what is available. If you're ok with the current state, I'm gonna merge it |
|
@Core447 I had this code in place so devs could determine if they want the actions to be shown if the group is available for the set action. By default every group should be shown even when its not supported |
|
Ok, gonna merge it now. We can still change this later on |




add_action_groupThis is the current UI for the Groups. When adding any styling to the nested expanders they go this black so I tried to match the Group Items to that styling. Using nested expanders also break the hover of normal items so I added that manually with more styling
