Skip to content

Fix/disappearing drop#1719

Merged
merryman merged 5 commits intomainfrom
fix/disappearing-drop
Feb 21, 2025
Merged

Fix/disappearing drop#1719
merryman merged 5 commits intomainfrom
fix/disappearing-drop

Conversation

@merryman
Copy link
Member

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.

@merryman merryman requested a review from linusha February 19, 2025 18:37
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.
@linusha linusha force-pushed the fix/disappearing-drop branch from b2386e9 to f75edfe Compare February 20, 2025 22:41
@linusha
Copy link
Contributor

linusha commented Feb 20, 2025

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>
@merryman merryman merged commit ef1fe31 into main Feb 21, 2025
4 checks passed
@merryman merryman deleted the fix/disappearing-drop branch February 21, 2025 11:42
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.

Dropping morphs into other morphs via halo fails to render morph.

2 participants