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

Storybook doesn't handle bound attributes from FAST #5

Open
kimberleyamackenzie opened this issue Sep 17, 2021 · 0 comments
Open

Storybook doesn't handle bound attributes from FAST #5

kimberleyamackenzie opened this issue Sep 17, 2021 · 0 comments
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@kimberleyamackenzie
Copy link
Contributor

I noticed that when there's a bound attribute in a Facet custom component, Storybook seems to ignore changes in that attribute. I found this when working on the left nav, but then also noticed it's an issue for the existing counter component.

In that component, there are two attributes using the x => x.something syntax:
<${buttonTag} appearance="${x => x.appearance}" @click=${x => x.increment()}>

In Facet's storybook, updating those two attributes ("appearance" through a select control, and "increment" through clicking the button itself) has no effect on the actual component. The html updates in the dom as expected, and the storybook args change as well, but the actual component isn't impacted. I confirmed that everything behaves as expected in the sandbox, leading me to believe this is a Storybook-FAST integration issue.

After poking around a little, my guess is that there is a bug between FAST's html function and Storybook - we follow the suggested Storybook syntax exactly, but the docs refer mostly to lit-html. There's not a lot of information about FAST and Storybook together, so I didn't have a lot of luck in finding a work around within Storybook.

The workaround for now is just working with the sandbox to develop components using the binding method for attributes, but I do think this is something important to solve in the near-ish term.

@kimberleyamackenzie kimberleyamackenzie added the kind/bug Some behavior is incorrect or out of spec label Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

1 participant