Skip to content

Conversation

@rjrjr
Copy link
Collaborator

@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 a team and zach-klippenstein 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
Collaborator 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
@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.

4 participants