You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building SVA recipes using ArkUI's @ark-ui/anatomy sometimes I need to add additional slots as I compose complex components. Unfortunately, Panda's build-time compiler does not support the [...anatomy.keys(), "more", "slots"] pattern.
Problem Statement/Justification
I am intentionally classifying this as a Feature Request and not a Bug given that the documentation does not explicitly call this out as a valid use case and I cannot reasonably expect static analysis to cover every valid run-time case.
I am using ArkUI's primitives to build my more complex components around but manually building style recipes using @ark-ui/anatomy to provide some helpful type checking.
Panda currently enters into what feels like undefined behavior where styles for slot names found in componentAnatomy.keys() are not generated into the output CSS during build, but class names are correctly generated at run time.
Proposed Solution or API
Ideally Panda would support the use case provided in the Problem Statement/Justification at build time.
However if not (or between now and when a solution can be shipped) a compile-time or eslint warning/error indicating that the splat + concat pattern ([...someArr, "more", "strings"]) will produce unexpected results would be super helpful.
Alternatives
Currently I manually and statically copy out the possible keys from the anatomy package. This is less than ideal but perfectly viable. My only issue with this is... I eventually forget that [...splat, "concat"] isn't supported and spent hours banging my forehead before checking my codebase and realizing I've already discovered and worked around this limitation.
Description
When building SVA recipes using ArkUI's
@ark-ui/anatomy
sometimes I need to add additional slots as I compose complex components. Unfortunately, Panda's build-time compiler does not support the[...anatomy.keys(), "more", "slots"]
pattern.Problem Statement/Justification
I am intentionally classifying this as a Feature Request and not a Bug given that the documentation does not explicitly call this out as a valid use case and I cannot reasonably expect static analysis to cover every valid run-time case.
I am using ArkUI's primitives to build my more complex components around but manually building style recipes using
@ark-ui/anatomy
to provide some helpful type checking.Given the following example:
Panda currently enters into what feels like undefined behavior where styles for slot names found in
componentAnatomy.keys()
are not generated into the output CSS during build, but class names are correctly generated at run time.Proposed Solution or API
Ideally Panda would support the use case provided in the Problem Statement/Justification at build time.
However if not (or between now and when a solution can be shipped) a compile-time or eslint warning/error indicating that the splat + concat pattern (
[...someArr, "more", "strings"]
) will produce unexpected results would be super helpful.Alternatives
Currently I manually and statically copy out the possible keys from the anatomy package. This is less than ideal but perfectly viable. My only issue with this is... I eventually forget that
[...splat, "concat"]
isn't supported and spent hours banging my forehead before checking my codebase and realizing I've already discovered and worked around this limitation.Additional Information
This is mildly related to #2671
The text was updated successfully, but these errors were encountered: