Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicoleoliveira we could leave the fragment in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I left
<> {caption} </>
it generated an error when compiling the storybook. I thought it was a specific syntax, I didn't understand that it could be modified. So I thought it best to put an html tag as an example to make it more intuitive. What do you think? :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicoleoliveira let me run the code once again and i'll get back to you.
Stay safe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicoleoliveira it checks out. Here's a sample repo with the code and a deployed version.
Testing done:
npm run storybook
and production mode withnpm run build-storybook && npm run serve-prod" (
serve-prod` is a script that i've included to emulate a production server running the statically built storybook).If you could emulate the error you've mentioned, please feel free to open an issue and if possible add a reproduction so that we could take a look at it. In terms of this pull request we're good with leaving in the fragment. But nonetheless we're truly thankful for catching that typo and fix it.
Let me know and we'll get this merged.
Stay safe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jonniebigodes … I appreciate your attention. I think you tested in .js file, but I found the problem in the .mdx. Let me try to be clearly:
That’s the sample code in the page of the story book. In the line where we can read “return <>{caption}</>;” throws an error saying that an html tag was expected.
I was trying to say that maybe, should be clear if the docs use some html tag there to just run the code and work. As example:
return
<p>${caption}</p>
;I’m working with web-components and using mdx. If using the tags like: “<></>” it should work, so a real error is happening.
There is my repo link as an example.
Execute
npm run storybook
to test.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the fumble fingering. I forgot to commit the mdx portion 🙈 . I've just pushed the updated config to the repo. But i'll keep looking into this, i'm going to clone the repo you've supplied (thank you very much for that) and see what's going on and let you know of my findings and we'll move from there.
Sounds good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sound good! Appreciate it. :)