Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: YaruSplitButton #928

Merged
merged 4 commits into from
Oct 9, 2024
Merged

feat: YaruSplitButton #928

merged 4 commits into from
Oct 9, 2024

Conversation

Feichtmeier
Copy link
Member

@Feichtmeier Feichtmeier commented Oct 7, 2024

Either a list of poupmenuitems needs to be provided or an onOptionButtonPressed callback

Question was if the list of options/callback should still be active if the main action is null/disabled?

Ref #912

@Feichtmeier Feichtmeier changed the title feat: YaruSplitButton feat: YaruSplitButton Oct 7, 2024
Copy link
Member

@Jupi007 Jupi007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
But I think it would be better to have a more generic implementation: something like a YaruGroupedButton widget, which could be more versatile 🤔

@Feichtmeier
Copy link
Member Author

LGTM 👍 But I think it would be better to have a more generic implementation: something like a YaruGroupedButton widget, which could be more versatile 🤔

what do you mean? like the position of the dropdown?

@Jupi007
Copy link
Member

Jupi007 commented Oct 7, 2024

In my idea, we could add as much item as we want, with any role, just like this: https://getbootstrap.com/docs/4.0/components/button-group/#nesting

@Feichtmeier
Copy link
Member Author

In my idea, we could add as much item as we want, with any role, just like this: https://getbootstrap.com/docs/4.0/components/button-group/#nesting

hm I don't know if the positioning of the menu will work then but maybe its totally possible
how about we add both: this specialized widget and that one?

@Feichtmeier Feichtmeier marked this pull request as draft October 7, 2024 20:34
@Jupi007
Copy link
Member

Jupi007 commented Oct 7, 2024

Yes, and this specialized widget could be a shortcut to the generic grouped button one.
This can be done in another PR :)

@Feichtmeier
Copy link
Member Author

Feichtmeier commented Oct 8, 2024

ok as requested I made the menu right aligned
also removed the default width so the width is just how wide the menu wants to be
I left the width parameter so when one wants to set it its still possible

grafik
grafik
grafik

@Feichtmeier Feichtmeier marked this pull request as ready for review October 8, 2024 18:06
@Feichtmeier Feichtmeier merged commit 9bfae97 into main Oct 9, 2024
7 checks passed
@Feichtmeier Feichtmeier deleted the Feichtmeier/issue912 branch October 9, 2024 15:35
@Feichtmeier
Copy link
Member Author

Merged it with ref instead of fixes so we can work on it more if we want to

@github-actions github-actions bot mentioned this pull request Oct 9, 2024
@spydon
Copy link
Collaborator

spydon commented Oct 10, 2024

Looks great! 😍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants