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

Fix/overriding split inline policies #1497

Closed
wants to merge 76 commits into from

Conversation

merryman
Copy link
Member

@merryman merryman commented May 7, 2024

This fixes a semantic problem with style policies, where overriding inline policies that are varied by different master dispatches will no longer be varied due to the way overridden properties are processed internally.
In effect this will cause previously dynamic inline policies to be strangely "stuck".

However there are also severe performance problems with the current implementation of style policies.

I am considering combining this fix into a future branch that also resolves performance issues.

@linusha linusha marked this pull request as ready for review May 31, 2024 12:47
@linusha linusha marked this pull request as draft May 31, 2024 12:48
@merryman merryman added the ⏱️ postponed A problem/idea that is known/documented but is not urgent/has previous pathdependencies. label Dec 18, 2024
Previously would return the wrong expression for export {} statements that were directly adjacent to another object expression.
Merge the var and ref replacement and the import export traversal into single passes.
The key is here to make the node functions parametrized, so that depending on the underlying AST system different nodes can be created by the same transform.
Since babel.js has a bunch of circular imports it has weird importing specific code that checks if modules have been already initialized. We introduce a method called bulletProofNamespace() which helps us to adjust these error checking codes such that they work in split bundles.
Previously some weirdly formatted es modules from esm servers would not be categorized correctly.
Issue that happens if a local variable in a module has the same name as its exported alias, which the transformed code previously would cause to be overridden. This only works with the babel transform for now.
partitioned breakpoints also have breakpoints, but it does not really make sense to display the breakpoint control for them.
Partitioned policies are synthesized, and any override by definition, will revoke the splitting. Therefore it does not make sense to extend the existing master via `applyConfiguration()`
Saves up to 40% in performance. The initial application is skipped in favor of just directly passing the style props to the morph constructor.
Conflicting properties such as width, height, extent or textString, value and textAndAttributes are prioritized and weeded out during synthesization in order to avoid confusing behavior.
Previously the check would give incorrect results when nested breakpoints where being applied. A nested breakpoint is a breakpoint defined by a master that was *itself* reached by a breakpoint.
…flag

Replaces old and not very well working control flows with a more sophisticated approach to determining sizing behavior of a styled morph within the context of various layouts.
According to the identified sizing behavior, the extent is applied in varying fashions. Also previously accidental re-execution of layouts would happen due to policies applying themselves, which lead to inefficient layout applications overall. This is now prevented with a meta flag.
Previously some layout applications, including text layout, would cause extent, height or width properies in style policies to no longer apply, although not warranted.
Previous code would always loop for a very large array of CSS rules. The new approach just remembers where the rule is stored and directly deletes it, avoiding the search entirely.
@merryman merryman force-pushed the fix/overriding-split-inline-policies branch from 1fc376a to 495ce4e Compare January 30, 2025 14:28
@merryman merryman closed this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⏱️ postponed A problem/idea that is known/documented but is not urgent/has previous pathdependencies.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant