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

BREAKING: Stop stomping View.layoutParams, new parameter for replaceViewInParent #1135

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

rjrjr
Copy link
Contributor

@rjrjr rjrjr commented Nov 14, 2023

WorkflowViewStub.replaceViewInParent now can be configured not to propagate layoutParams, by setting new property propagatesLayoutParams to false. When it's true (the default), the stub's layoutParams are passed as a new third argument to the (customizable) replaceViewInParent function, to make it clearer that this function bears responsibility for applying them.

Motivated because BodyAndOverlaysContainer and WorkflowLayout were being dictatorial about the body view's layout params for no clear reason, leading to layout surprises. They're the first to opt out of propagatesLayoutParams.

@rjrjr rjrjr requested review from zach-klippenstein and a team as code owners November 14, 2023 00:49
@rjrjr rjrjr force-pushed the ray/do-not-stomp-bounds branch 2 times, most recently from b03aeec to df6b71a Compare November 14, 2023 20:18
@rjrjr rjrjr changed the title BREAKING: Stop stomping View.layoutParams Stop stomping View.layoutParams Nov 14, 2023
@rjrjr rjrjr force-pushed the ray/do-not-stomp-bounds branch 2 times, most recently from b820047 to db1ef11 Compare November 15, 2023 01:18
@rjrjr rjrjr changed the title Stop stomping View.layoutParams BREAKING: Stop stomping View.layoutParams Nov 15, 2023
@rjrjr rjrjr force-pushed the ray/do-not-stomp-bounds branch from db1ef11 to 17c412c Compare November 15, 2023 19:20
@rjrjr
Copy link
Contributor Author

rjrjr commented Nov 15, 2023

Renamed to propagatesLayoutParams, added missing kdoc, and punched up kdoc on replaceOldViewInParent. Will push again to beef up the commit message.

…ceViewInParent`

`WorkflowViewStub.replaceViewInParent` now can be configured not to propagate `layoutParams`, by setting new property `propagatesLayoutParams` to `false`. When it's `true` (the default), the stub's `layoutParams` are passed as a new third argument to the (customizable) `replaceViewInParent` function, to make it clearer that this function bears responsibility for applying them.

Motivated because `BodyAndOverlaysContainer` and `WorkflowLayout` were being dictatorial about the body view's layout params for no clear reason, leading to layout surprises. They're the first to opt out of `propagatesLayoutParams`.
@rjrjr rjrjr force-pushed the ray/do-not-stomp-bounds branch from 17c412c to b11e61e Compare November 15, 2023 19:27
@rjrjr rjrjr changed the title BREAKING: Stop stomping View.layoutParams BREAKING: Stop stomping View.layoutParams, new parameter for replaceViewInParent Nov 15, 2023
@rjrjr rjrjr enabled auto-merge November 15, 2023 19:28
@rjrjr rjrjr merged commit 91ab3e8 into main Nov 15, 2023
31 checks passed
@rjrjr rjrjr deleted the ray/do-not-stomp-bounds branch November 15, 2023 20:16
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