feat(app): display inputsignals as inputs rather than properties#1439
feat(app): display inputsignals as inputs rather than properties#1439vogloblinsky merged 2 commits intocompodoc:developfrom
Conversation
|
Did you know why tests are failing ? |
|
No, I'll have a look on Thursday |
|
@vogloblinsky I fixed it, forgot a condition for |
|
@vogloblinsky do you take it from here? The time I got from my company for Compodoc is used up now, but feel free to contact me if there are any questions |
|
Thanks for the PR |
|
Storybook core maintainer here 👋 Do you have a rough estimate of when the input/output signal work will be released? We have made the necessary adjustments in Storybook to support both signal types type-wise. We await a Compodoc release to announce full signal support in Storybook. |
|
This week or beggining of next week. |
| public getInputSignals(props) { | ||
| let inputSignals = []; | ||
| props?.forEach((prop, i) => { | ||
| const regexp = /input(?:\.(required))?(?:<([\w-]+)>)?\(([\w-]+)?\)/; |
There was a problem hiding this comment.
@astrutz This regex has quite some limitations. I will list the most obvious ones and potentially we can adjust the regex to cover the cases:
input("helloworld")-> strings are not supported as default valuesinput(false, { transform: booleanAttribute });-> as soon as a transformation option is used, the regex doesn't match
I am thinking of potentially rather use some babel parsing here instead of relying on a regex, since the expression might also have some new line characters, especially if the options object is used to provide a transform function
There was a problem hiding this comment.
There was a problem hiding this comment.
@vogloblinsky thank you so much for this if you can support the cases @valentinpalkovic mentioned, thank you so much in advance.
There was a problem hiding this comment.
@valentinpalkovic I agree with you, although I can't really do much, as I don't have the capacity atm. I'll check with company and can come back to you in about 3 weeks
There was a problem hiding this comment.
@astrutz Is there a Github issue ticket for that? This issue in relation to Storybook is quite important to me currently as it unfortunately makes it kind of unusable currently :(
Closes #1434.
I didn't find a better way to extract the input signals than with a regex inside the properties