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
[Flamingo] Evolution of command button component classes #231
Comments
Can you be a little more specific on the particular class? |
Sorry. It was SubstanceCommandToggleButtonUI that I was referring to. Hmm, maybe there's an alternate strategy for adding drop-down menu functionality to a toggle button. |
Right, anything in But let's take a step back and talk about the specific requirement - adding drop-down menu to a toggle button. Can you point me to where this functionality is available (preferably in Office) so that I can see the mechanics behind it? Is it that the button has two area, one for action / toggle, and one for showing the popup? |
Yes, the button has two areas. See the video of our implementation: In MACOS, a toggle button is used to start/stop screen recording. A drop-down menu is used to specify the audio source for the recording: Here's a microsoft article on the concept of a Split Button: As the top video shows, we have a working implementation of the control, but it was only possible by duplicating If we've missed an approach that better meets the spirit/intention of Radiance, then I welcome your guidance :-) |
I think it would be best to provide this functionality in Flamingo itself. I'll need to check a few things first. The separation of Now they are both created from a Maybe this distinction isn't right any more. Same as there is no separate It would be a breaking change though to combine these four classes into two, along with the matching changes to combine the underlying model implementations - |
Sure, @kirill-grouchnikov - it's your show! I guess we can keep our "local" version for now, and adopt a Flamingo version when it arrives. |
I'm going to change the title of this bug to reflect the more narrow scope of the feature request. |
My original intention was that once the class in question became extensible we'd contribute a PR containing the new feature. But, thanks for generously taking it on yourself, @kirill-grouchnikov . |
There are no plans to make the UI delegate classes be part of the public API surface. |
Fold JCommandToggleButton into JCommandButton. Fold JCommandToggleMenuButton into JCommandMenuButton. Tracked by #231
The first pass is done. See sample in https://github.com/kirill-grouchnikov/radiance/blob/master/demos/flamingo-demo/src/main/java/org/pushingpixels/demo/flamingo/common/TestCommandToggleButtons.java#L116 on how to combine toggle for main action with secondary content. The second pass (tentative) will fold |
Fold JCommandMenuButton into JCommandButton Tracked by #231
Overall 960 lines fewer in the codebase after consolidating the command button component classes and their UI delegates. |
Thanks for this support @kirill-grouchnikov We have a temporary fix in place, until the next Flamingo release. To help our planning - do you have a planned date for the release of |
Version of Radiance (current development is 3.0-SNAPSHOT)
2.5.1
Sub-project (Neon, Trident, Substance, Flamingo, ...)
Flamingo
Version of Java (current minimum is 9)
11
Version of OS
MACOS/Linux
The issue you're experiencing (expected vs actual, screenshot, stack trace etc)
We'd like to subclass the Flamingo Command Toggle Button, to include a drop-down menu, like in this UX mockup:
But, since the constructor only has package visibility, we're not able to.
Is it an option to relax the constructor visibility?
Or do you have an alternate strategy for sub-classing a Flamingo control?
The text was updated successfully, but these errors were encountered: