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

Set the minWidth and the minHeight of the endPanel created for a box layout #1513

Merged
merged 11 commits into from
Jan 26, 2024
Merged

Set the minWidth and the minHeight of the endPanel created for a box layout #1513

merged 11 commits into from
Jan 26, 2024

Conversation

koendehondt
Copy link
Contributor

@estebanlm

The PR for Pharo 12 was #1507.

This is the PR to fix the same problem in Pharo 11.

…layout, so that an empty endPanel does not render the default number of pixels specified in Morph>>#minWidth and Morph>>#minHeight.
@koendehondt koendehondt changed the title Set the minWidth and the minHeight of the endPanel created for a box … Set the minWidth and the minHeight of the endPanel created for a box layout Jan 26, 2024
@koendehondt
Copy link
Contributor Author

The changes made two box layout tests fail, because of rounding errors on the width of the children of the box layout. I adapted the code to avoid rounding errors.
On CI, the initial window width is 240 pixels instead of the 400 pixels in SpWindowPresenter>>#defaultInitialExtent. That made the tests fail on CI, while they were green locally. That issue accounts for the many commits to adapt the tests.
The tests used a list, but its initial width is bigger than the space allotted by the box layout. That is why some assertions used a >= instead of =. I replaced the list by a button.
I wonder whether the previous issue was the reason to add #skipOnPharoCITestingEnvironment in two tests. I took them out, as the tests are green on CI now.

Btw: does #skipOnPharoCITestingEnvironment actually avoid running a test on CI? They were run and they failed, so it is probably a good idea to check whether the environment variable is in use on CI.

@koendehondt
Copy link
Contributor Author

@estebanlm The tests are green except for one that does not seem to be related to the changes. Please review and merge.

@estebanlm estebanlm merged commit f8c9b76 into pharo-spec:Pharo11 Jan 26, 2024
1 of 2 checks passed
@koendehondt koendehondt deleted the bugfix/boxlayout-endpanel-minwidth-minheight branch January 27, 2024 11:45
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.

2 participants