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

[Refactor] Turn @readonly JS Doc into getters #10263

Open
1 of 5 tasks
maxpatiiuk opened this issue Sep 10, 2024 · 2 comments
Open
1 of 5 tasks

[Refactor] Turn @readonly JS Doc into getters #10263

maxpatiiuk opened this issue Sep 10, 2024 · 2 comments
Labels
0 - new New issues that need assignment. calcite-components Issues specific to the @esri/calcite-components package. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. refactor Issues tied to code that needs to be significantly reworked.

Comments

@maxpatiiuk
Copy link
Member

maxpatiiuk commented Sep 10, 2024

Description

Blocked by #10310

Calcite components have ~22 readonly properties.

Those are currently denoted using the @readonly JS Doc tag:

This shows the property as readonly in the docs and the typings, but not at runtime.

In Lumina (formerly ArcGIS Lit) readonly can be enforced at runtime

Lumina readonly properties

See also this comment from Matt: https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/1463#issuecomment-4996968

Thus, after running the codemod, you should manually refactor the readonly property to getters OR add readOnly:true parameter to @property() decorator.

Proposed Advantages

The read only properties will be enforced for non-TypeScript users and HTML-only users

Which Component

22 properties across several components

Relevant Info

No response

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components
@maxpatiiuk maxpatiiuk added 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. refactor Issues tied to code that needs to be significantly reworked. labels Sep 10, 2024
@maxpatiiuk maxpatiiuk changed the title [Migration] Turn @readonly JS Doc into getters [Refactor] Turn @readonly JS Doc into getters Sep 12, 2024
@github-actions github-actions bot added the calcite-components Issues specific to the @esri/calcite-components package. label Sep 12, 2024
@jcfranco
Copy link
Member

Blocked by #10310.

@jcfranco jcfranco added the blocked This issue is blocked by another issue. label Sep 27, 2024
Copy link
Contributor

Issue #10310 has been closed, this issue is ready for re-evaluation.

cc @geospatialem,@DitwanP

@github-actions github-actions bot removed the blocked This issue is blocked by another issue. label Nov 26, 2024
@geospatialem geospatialem added needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Nov 26, 2024
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. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. refactor Issues tied to code that needs to be significantly reworked.
Projects
None yet
Development

No branches or pull requests

3 participants