Skip to content

Commit

Permalink
Deprecate Java YogaConfig.setUseLegacyStretchBehaviour()
Browse files Browse the repository at this point in the history
Summary: Now that our own usages are removed, mark this as deprecated to encourage users to move to the errata API. The same will be done to variants of this function on other platforms before releasing, and the functions will be removed after releasing.

Differential Revision: D45300343

fbshipit-source-id: 778ea508cf347f2a0d334a2a46da6420fac6b420
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Apr 26, 2023
1 parent 273baac commit 28dad96
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions java/com/facebook/yoga/YogaConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ public abstract class YogaConfig {
* Yoga previously had an error where containers would take the maximum space possible instead of the minimum
* like they are supposed to. In practice this resulted in implicit behaviour similar to align-self: stretch;
* Because this was such a long-standing bug we must allow legacy users to switch back to this behaviour.
*
* @deprecated "setUseLegacyStretchBehaviour" will be removed in the next release. It's usage should be replaced with
* "setErrata(YogaErrata.ALL)" to opt into compatibility in the face of future conformance changes, or
* "setErrata(YogaErrata.STRETCH_FLEX_BASIS)" to opt into incorrect behavior only for this case.
*/
@Deprecated
public abstract void setUseLegacyStretchBehaviour(boolean useLegacyStretchBehaviour);

public abstract void setErrata(YogaErrata errata);
Expand Down

0 comments on commit 28dad96

Please sign in to comment.