-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
RN: Button Block set the width to fixed when width is set #29360
RN: Button Block set the width to fixed when width is set #29360
Conversation
Size Change: +24.1 kB (+2%) Total Size: 1.41 MB
ℹ️ View Unchanged
|
Hey @enejb I was testing this and it works great on iPhone but on Android, there's this issue: Looks like it's adding some extra height to the buttons when the max width is limited to the min width. |
I did a bit of an investigation here and it seems that the root cause is that the Aztac Editor doesn't return the correct height back to the react native side. here
I am not really sure how to go about fixing this. |
Thanks to @AmandaRiu, we were able to come up with a solution that works well. 🥳 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Tested it on both iOS and Android and it is working correctly. Nice work!
Description
In #28543 we shipped a new button width setting.
However it doesn't quite work as expected. Since if you type too many characters the buttons width expands and takes the buttons don't fit on the row as expected any more.
This PR tried to fix that by setting the maxWidth to the minWidth if a width is set and not null. (Auto)
Before:
After:
How has this been tested?
Add 4 different 25% width Button blocks. Notice that they all fall in the same line. Take up the whole editor.
Set up different width buttons do things work out as expected?
Screenshots
25%
50% and 75%
Checklist: