-
Notifications
You must be signed in to change notification settings - Fork 182
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
Proposal: Enhance Button2D #636
base: master
Are you sure you want to change the base?
Conversation
Hello @Nibba2018, I have some suggestions though |
Thank you for your feedback @m-agour . Will consider your points for my upcoming commits. 👍
What would you think would be a better option? Always maintain the aspect ratio or allow the user to choose?
I was also thinking about the design for this and it surely requires some discussion. The existing For me the existing But again the exiting one can be considered a Base Button and the new one could be renamed as a PushButton. Idk.
Yep, on it's way. |
You are welcome, thanks.
For me, I would always keep the aspect ratio as it is, but I'm not sure about other users.
Yes you are right, maybe it should be this way as you did, but the name |
Yes indeed, |
Same here, I would always keep the aspect ratio. It simplifies the life of many users. We can allow the user to choose for advanced users but by default, always keep the aspect ratio.
I like the name ToolButton, You can rename it like this for now (since I do not like Icon2D). We might need a deprecation cycle. In any case, we should unify the codebase of both buttons to simplify the maintenance. Actually, I wonder why you had to create a new class instead of updating the current one. What are the incompatibilities? |
Codecov Report
@@ Coverage Diff @@
## master #636 +/- ##
==========================================
- Coverage 50.41% 50.17% -0.24%
==========================================
Files 120 120
Lines 27160 27354 +194
Branches 3001 3011 +10
==========================================
+ Hits 13693 13726 +33
- Misses 13006 13164 +158
- Partials 461 464 +3
|
Hi @skoudoro My motivation behind creating a new class was to separate the concerns among them. The New implementation on the other hand requires a background and a text actor which might not be necessary for our previous UI components leading to bloating. We might consider the old button to be a special case of our new button as mentioned by @m-agour by hiding the background and text actor when there aren't any text but then the hidden actors will be part of the object and therefore would increase bloat too. This may also lead to further inconsistencies in the future for different applications of the button. Regarding maintainability, I think our old implementation is complete enough to act as a ToolButton and we can instead focus on adding additional features to our new one. I would Like to know your thoughts on this thanks! |
Proposal:
Improve Button2D to accept texts and also include a background.
Also adds few quality of life changes like feedback when the button is clicked etc.
This is also a requirement to implement
FileDialog2D
as mentioned here.The previous
Button2D
class is renamed toIcon2D
ToolButton2D
.Feedback appreciated.
Quick Test: