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

"Variant Unavailable" could offer more helpful explanation #153

Open
nathanacurtis opened this issue Apr 19, 2024 · 0 comments
Open

"Variant Unavailable" could offer more helpful explanation #153

nathanacurtis opened this issue Apr 19, 2024 · 0 comments
Labels
New feature New feature or request Props Relevant specific to Props section

Comments

@nathanacurtis
Copy link
Member

Problem

Users don't understand why "Variant unavailable" occurs for some outputs.

Solutions

Improve the error message?
Link the message to an online explanation of what it is and how to adjust for best results.

Feedback to recent user

This is a result of a failed .setProperties call, such that the plugin is trying to change the props of the reference it started from, and the combination of properties doesn't exist.

For each prop, it cycles through all options of that prop with all other props held constant.

For example, imagine a component set with three variants:
Prop 1=A, Prop 2 = A
Prop 1=A, Prop 2 = B
Prop 1=B, Prop 2 = A
If you start from #2 (Prop 1=A, Prop 2 = B), the component will produce Variant unavailable when it tries to produce a row with Prop 1=B, Prop 2=B.

This should only be happening when you have "missing variant combinations". When that happens, consider running the plugin by selecting a different starter variant to produce different results.

@nathanacurtis nathanacurtis added New feature New feature or request Props Relevant specific to Props section labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New feature New feature or request Props Relevant specific to Props section
Projects
Status: No status
Development

No branches or pull requests

1 participant