Feat(ActionGroup): Added Action Groups by G4PLS · Pull Request #295 · StreamController/StreamController · GitHub
Skip to content

Feat(ActionGroup): Added Action Groups#295

Merged
Core447 merged 14 commits into
StreamController:devfrom
G4PLS:action-chooser-groups
Dec 25, 2024
Merged

Feat(ActionGroup): Added Action Groups#295
Core447 merged 14 commits into
StreamController:devfrom
G4PLS:action-chooser-groups

Conversation

@G4PLS

@G4PLS G4PLS commented Dec 8, 2024

Copy link
Copy Markdown
Member
  • 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

This 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
image

…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
@G4PLS G4PLS self-assigned this Dec 8, 2024
@G4PLS G4PLS requested a review from Core447 December 8, 2024 12:06
- Swapped from adding css_classes in the Constructor to add them via method which fixes the weird styling from before
@G4PLS

G4PLS commented Dec 8, 2024

Copy link
Copy Markdown
Member Author

G4PLS added 2 commits December 8, 2024 16:22
- 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
@G4PLS

G4PLS commented Dec 8, 2024

Copy link
Copy Markdown
Member Author

Latest styling now looks like this:
image

@Core447

Core447 commented Dec 8, 2024

Copy link
Copy Markdown
Member

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
@G4PLS

G4PLS commented Dec 8, 2024

Copy link
Copy Markdown
Member Author

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.

Jup thats something to take a look at
But i personally dont find it that bad if its not fixable (It would be annoying tho)

Searching is also something that needs to be reworked. Currently you get errors because the Expander dont contain a label

@G4PLS

G4PLS commented Dec 8, 2024

Copy link
Copy Markdown
Member Author

@Core447 do you maybe know how to remove the arrow?
Then I could implement that behaviour manually

@Core447

Core447 commented Dec 8, 2024

Copy link
Copy Markdown
Member

@G4PLS a61a91e fixes this

@Core447

Core447 commented Dec 8, 2024

Copy link
Copy Markdown
Member

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.

@G4PLS

G4PLS commented Dec 8, 2024

Copy link
Copy Markdown
Member Author

Ah yeah that makes sense
I personally liked the new one more because its quite clear (The Icon im using is imo very well known)

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
@G4PLS

G4PLS commented Dec 10, 2024

Copy link
Copy Markdown
Member Author

@Core447 we need to add the Function back that disables the Action if its unsupported/untested
Currently everything gets shown normally. I dont know how you did this so would it be possible for you to take a look or can you tell me how you determined that?

@G4PLS

G4PLS commented Dec 10, 2024

Copy link
Copy Markdown
Member Author

We also need a nicer way to style it, currently its visually now that easy to seperate between Actions and Groups
image

- 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
@G4PLS

G4PLS commented Dec 11, 2024

Copy link
Copy Markdown
Member Author

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

@Core447

Core447 commented Dec 23, 2024

Copy link
Copy Markdown
Member

@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

@G4PLS

G4PLS commented Dec 24, 2024

Copy link
Copy Markdown
Member Author

@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

@Core447

Core447 commented Dec 25, 2024

Copy link
Copy Markdown
Member

Ok, gonna merge it now. We can still change this later on

@Core447 Core447 merged commit 5777f78 into StreamController:dev Dec 25, 2024
@G4PLS

G4PLS commented Dec 25, 2024

Copy link
Copy Markdown
Member Author

@G4PLS G4PLS deleted the action-chooser-groups branch December 27, 2024 12:52
@G4PLS G4PLS moved this from In progress to Waiting for release in Dev May 18, 2025
@G4PLS G4PLS moved this from Waiting for release to Released in Dev May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Released

Development

Successfully merging this pull request may close these issues.

2 participants