stencil icon indicating copy to clipboard operation
stencil copied to clipboard

bug: markdown docs not displaying types as expected

Open aresrioja10 opened this issue 3 years ago • 7 comments

Prerequisites

Stencil Version

2.13.0

Current Behavior

When using custom types in a component prop like this:

export const UTIL_BUTTON_VARIANT_LIST = ['primary', 'secondary', 'important'];
export type UTIL_BUTTON_VARIANT_LIST_TYPE = typeof UTIL_SPACING_TYPE_LIST[number];

/**
 * Style variation of the button.
 */
@Prop() variant: UTIL_BUTTON_VARIANT_LIST_TYPE = UTIL_BUTTON_VARIANT_LIST[0];

the generated readme file show always the type string:

Property Attribute Description Type Default
href href The button href string '#'
iconDirection icon-direction The icon direction of the button "left" | "right" 'right'
iconName icon-name Icon name string ''
size size The size of the button string UTIL_SPACING_TYPE_LIST[1]
variant variant Style variation of the button. string UTIL_BUTTON_VARIANT_LIST[0]

Expected Behavior

The readme should show the correct type, as well as the default value. The previous example should be:

Property Attribute Description Type Default
variant variant Style variation of the button. UTIL_BUTTON_VARIANT_LIST_TYPE 'primary'

Steps to Reproduce

Use the previous code show in the Current Behavior section

Code Reproduction URL

https://github.com/not-neccesary

Additional Information

No response

aresrioja10 avatar Sep 13 '22 11:09 aresrioja10

Hey @aresrioja10 👋

Thanks for the detailed info! Can you please create a reproduction case for the team to pull down and inspect? Thanks!

rwaskiewicz avatar Sep 13 '22 11:09 rwaskiewicz

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

Please reproduce this issue in an Stencil starter component library and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

For a guide on how to create a good reproduction, see our Contributing Guide.

ionitron-bot[bot] avatar Sep 13 '22 11:09 ionitron-bot[bot]

@rwaskiewicz Let me know if you have access:

https://gitlab.com/david.porres.dev/stencil-types-issue

aresrioja10 avatar Sep 13 '22 14:09 aresrioja10

Looks like I do. Thanks!

rwaskiewicz avatar Sep 13 '22 14:09 rwaskiewicz

I'm going to label this to get it ingested into the backlog for the team to refine further. Thanks!

rwaskiewicz avatar Sep 13 '22 16:09 rwaskiewicz

Thanks @rwaskiewicz !! Could you estimate when it could be solved?

aresrioja10 avatar Sep 14 '22 07:09 aresrioja10

Hey @aresrioja10, I don't have an estimate for you at this time.

rwaskiewicz avatar Sep 14 '22 11:09 rwaskiewicz

It turns out that this has been a problem for a long time, and it's a shame that it hasn't been solved yet

wabi-habi avatar Jul 21 '23 05:07 wabi-habi