Skip to content

fix(plugin): recursive optimisation of pattern matches in attributes/…#41

Merged
shayanhabibi merged 1 commit intostorybookfrom
develop-bugfix
Sep 8, 2025
Merged

fix(plugin): recursive optimisation of pattern matches in attributes/…#41
shayanhabibi merged 1 commit intostorybookfrom
develop-bugfix

Conversation

@shayanhabibi
Copy link
Copy Markdown
Owner

…properties

Also fixed the spawning of singleton operations in pattern matches.

Previously, reactivity of solid-js would be broken when pattern matching on a property directly. This is because the generation of the expression (matchValue = props.___, matchValue === ____ ? ____ : ___) et al would not be caught by the solid-js library/compiler.

For this reason, we remove this CE optimisation when pattern matching on property getters only.

This behaviour can be disabled using the SkipCEOptimisation component flag.

This constitutes a 'fix' more than a breaking change.

…properties

Also fixed the spawning of `singleton` operations in pattern matches.

Previously, reactivity of solid-js would be broken when pattern matching on a property directly. This is because the generation of the expression `(matchValue = props.___, matchValue === ____ ? ____ : ___)` et al would not be caught by the solid-js library/compiler.

For this reason, we remove this CE optimisation when pattern matching on property getters only.

This behaviour can be disabled using the SkipCEOptimisation component flag.

This constitutes a 'fix' more than a breaking change.
@shayanhabibi shayanhabibi changed the base branch from master to storybook September 8, 2025 15:33
@shayanhabibi shayanhabibi merged commit c98102f into storybook Sep 8, 2025
3 checks passed
shayanhabibi added a commit that referenced this pull request Sep 11, 2025
* storybook base implementation

* alpha version storybook

* doc extensions, member val string enum matching, et al

* known bug: render and arg variant pairs don't mesh well. Better to just stick to one or the other.

Made it so key value pairs for children arg will have the value expr transformed by the main plugin

* fix fantomas break

* Remove jetbrains language injection attributes to determine if they are preventing
tailwind injection by the tailwind language service

* bump version

* fix(plugin): recursive optimisation of pattern matches in attributes/properties (#41)

Also fixed the spawning of `singleton` operations in pattern matches.

Previously, reactivity of solid-js would be broken when pattern matching on a property directly. This is because the generation of the expression `(matchValue = props.___, matchValue === ____ ? ____ : ___)` et al would not be caught by the solid-js library/compiler.

For this reason, we remove this CE optimisation when pattern matching on property getters only.

This behaviour can be disabled using the SkipCEOptimisation component flag.

This constitutes a 'fix' more than a breaking change.

* fix(plugin): ArrayAlloc and ArrayFrom expressions are transformed

* better expression collection abstraction

* add(storybook): `decorator` custom operation for defining decorators

* add(storybook): `decorator` custom operation for defining decorators

* feat: storybook support
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.

1 participant