Skip to content
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

Use JSX syntax in stories #10735

Open
1 of 5 tasks
maxpatiiuk opened this issue Nov 15, 2024 · 1 comment
Open
1 of 5 tasks

Use JSX syntax in stories #10735

maxpatiiuk opened this issue Nov 15, 2024 · 1 comment
Labels
0 - new New issues that need assignment. calcite-components Issues specific to the @esri/calcite-components package. estimate - 13 Requires planning and input from team, consider smaller steps. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. p - low Issue is non core or affecting less that 10% of people using the library refactor Issues tied to code that needs to be significantly reworked.

Comments

@maxpatiiuk
Copy link
Member

Description

With migration to Lumina, stories can now be authored using JSX syntax.

Proposed Advantages

This has benefits of better type safety and better developer experience compared to lit-html.
The semantics of JSX in Lumina stories is equivalent to that of JSX in Lumina components, so that is one less syntax to learn.

Which Component

All

Relevant Info

See PR#1864 in arcgis-web-components monorepo for an example of transition from lit-html to JSX in Stories

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/calcite-ui-icons
  • @esri/eslint-plugin-calcite-components
@maxpatiiuk maxpatiiuk added refactor Issues tied to code that needs to be significantly reworked. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Nov 15, 2024
@github-actions github-actions bot added the calcite-components Issues specific to the @esri/calcite-components package. label Nov 15, 2024
@maxpatiiuk
Copy link
Member Author

JSX would also simplify boolean props in stories:

- ${boolean("control-overlay", args.controlOverlay)}
+ controlOverlay={args.controlOverlay}

@driskull driskull added p - low Issue is non core or affecting less that 10% of people using the library estimate - 13 Requires planning and input from team, consider smaller steps. labels Feb 25, 2025
@DitwanP DitwanP added needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. calcite-components Issues specific to the @esri/calcite-components package. estimate - 13 Requires planning and input from team, consider smaller steps. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. p - low Issue is non core or affecting less that 10% of people using the library refactor Issues tied to code that needs to be significantly reworked.
Projects
None yet
Development

No branches or pull requests

3 participants