-
Notifications
You must be signed in to change notification settings - Fork 9
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
Invalid escaping if stories.yml args contain top-level object. #20
Comments
It seems that changing:
with
will resolve the issue. Now the question is why Storybook (via server render framework) passes the |
This also indicates that a new nested component CTA may be in order here, but that is beyond the point. |
Reading more in https://github.com/storybookjs/storybook/blob/next/code/frameworks/server-webpack5/README.md makes me think we'll likely be fine, unless we decide to support server params... which we might. I am torn by this, I feel this is an upstream bug. The documentation clearly states that
Yet they differ in their encoding. @mikemiles86 did you resolve this issue? Did you file a bug upstream? |
Closing tentatively. I might reopen based on feedback. |
Hi @e0ipso, Nate with MIT-Sloan here, we have not resolved this issue and did not file a bug upstream. Is that the best next step to have your proposed solution merged in a later update? |
@e0ipso I can confirm that changing
to
solves the issue. I do not have enough understanding of how Storybook addons work to confidently open an upstream issue. In the mean time my team and I are working on updating our systems to use Yarn 2 (or 3) so that we can patch this addon with the change. |
I will commit this change. No need for you to patch. I think it makes sense to support this feature. |
When creating a
*.stories.yml
file for a component if an argument is an object and it is not contained within an items array, then the whole object is escaped and treated as a string. This prevents the "cl_server" module from correctly decoding it and passing the arguments to the twig template.This seems to be an issue from this plugin not correctly escaping and encoding the arguments from the *.stories.yml file.
Example
Twig template (mycomponent.twig.html)
Stories (mycomponent.stories.yml)
Request
Example of the request sent to the cl_server endpoint:
Decoded request:
What the decoded params are decoded as:
Expected request:
What the decoded params should be decoded as:
The text was updated successfully, but these errors were encountered: