stencil icon indicating copy to clipboard operation
stencil copied to clipboard

bug: All @Events are cancelable by default when component may not necessarily support event cancelation

Open jcfranco opened this issue 3 years ago • 1 comments

Prerequisites

Stencil Version

2.17.1

Current Behavior

Any custom event created with @Event is set as cancelable: true by default. Developers should explicitly make an event cancelable once a component supports cancelation.

One side-effect from this is that anything derived from the docs-json output target can be misleading. For example, we use the docs-json output file to create custom doc pages and there was some confusion about event cancelation as they were all documented as such, but only a handful were truly cancelable (see https://github.com/Esri/calcite-components/issues/3967 for more info).

Expected Behavior

Events are not cancelable by default.

Steps to Reproduce

See steps in readme from https://github.com/jcfranco/stencil-all-events-cancelable-by-default

Code Reproduction URL

https://github.com/jcfranco/stencil-all-events-cancelable-by-default

Additional Information

No response

jcfranco avatar Jul 29 '22 19:07 jcfranco

Hey @jcfranco 👋

Sorry for the delay on this. I was able to confirm we default events as cancelable and that is getting reported in the generated documentation JSON files. I'll get this labeled so it's pulled into our backlog and we can discuss as a team. Thanks for reporting the issue!

tanner-reits avatar Sep 01 '22 15:09 tanner-reits