Conversation
linusha
approved these changes
Feb 20, 2025
This was a hack that fixed an isse due to incorrectly initialized style properties in the fully synthesized buildspecs. The incorrect initialization would happen due to breakpoints only getting correctly triggered after layout application, however since the buildspec synthesization time does not yet allow layouts to be computed, default values needed to be assumed, causing incorrect breakpoint styling as a result. To correct this, we needed a entry point to correct such cases, to which the addMorphAt() lend itself. However this caused other issues, making this solution untenable.
Allows to estimate the extents of morphs due to layout applocation before morphs are being initialized. Allows style policies to pre-compute styles for breakpoints before morphs are getting initialized.
b2386e9 to
f75edfe
Compare
Contributor
|
For the sanity of our future selfs, I think it makes sense to fixup the comment I pointed out above. Afterwards, feel free to merge @merryman. I rebased it already for you, so that the conflict I introduced while merging is taken care of. |
Co-authored-by: Linus Hagemann <mail@linushagemann.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1718.
Was due to an incomplete implementation of #1696 which was due to an oversight from my part: The full synthesization of the style properties of the entire morph hierarchy to be created from a component was faulty, since it ignores the effect of layout applications, which in the end leads to incorrect synthesization of style properties due to wrong breakpoints getting triggered.
This PR fixes that by performing a rough "pre-computation" of layouts on the level of style specs instead of morph, allowing us to avoid running into the issue described.