calcite-design-system icon indicating copy to clipboard operation
calcite-design-system copied to clipboard

Some properties (e.g. `inputMode` not available anymore)

Open hcampos-professional opened this issue 9 months ago • 4 comments

Check existing issues

Actual Behavior

While testing the latest v2.8.0 of Calcite Components together with the JSAPI, the Typescript compiler reported that inputMode is no longer available as a property of <calcite-input-number>. It seems like the change got introduced by https://github.com/Esri/calcite-design-system/commit/13ba95375a9cb9091edf469d45827bd8374098b9 and it could affect apps using that property or any of the other properties that were removed.

Expected Behavior

Typings should still contain the previously-existing properties. Alternatively, a breaking change and consequent major version should be released.

Reproduction Sample

https://codepen.io/hccampos/pen/ExJzRRq

Reproduction Steps

  1. Open https://codepen.io/hccampos/pen/ExJzRRq
  2. Inspect the input element.
  3. Type $0.inputMode in the console and notice that the inputMode property isn't set.

Alternatively, build an application which makes use of the typings and notice that the property isn't available.

Reproduction Version

2.8.0

Relevant Info

No response

Regression?

2.7.x

Priority impact

p0 - emergency

Impact

While it doesn't directly impact my team (we haven't decided if we'll upgrade to this version of Calcite for the upcoming release), it can potentially affect any application which was using one of the removed properties. Their builds can fail and the components may not work as expected.

Calcite package

  • [X] @esri/calcite-components
  • [ ] @esri/calcite-components-angular
  • [ ] @esri/calcite-components-react
  • [ ] @esri/calcite-design-tokens
  • [ ] @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Maps SDK for JavaScript

hcampos-professional avatar May 01 '24 13:05 hcampos-professional

Closing out the above as the global attributes are provided and the issue for Maps SDK for JS appears to be related to the maquette VDOM library typings for globals.

geospatialem avatar May 02 '24 15:05 geospatialem

One thing that https://github.com/Esri/calcite-design-system/pull/9123 overlooked was how our custom global component prop's were using the kebabified™ case vs the native ones. I think we can add props (@internal) for enterKeyHint and inputMode to allow the VDOM typing tool referenced above to do proper attribute mapping. We can drop support for the kebab-case attributes in 3.x.

jcfranco avatar May 02 '24 17:05 jcfranco

Reopening to provide support to kebab-case per Franco's comment above.

geospatialem avatar May 02 '24 18:05 geospatialem

Installed and assigned for verification.

github-actions[bot] avatar May 03 '24 20:05 github-actions[bot]

🍡 Verified locally on hotfix

DitwanP avatar May 13 '24 23:05 DitwanP

Reopening due to autofocus prop/attr type issue. Using @internal removes the prop/attr from components.d.ts and due to https://github.com/ionic-team/stencil/issues/5726 the type cannot be resolved (inputMode and enterKeyHint do not have this issue).

cc @AdelheidF

jcfranco avatar May 15 '24 02:05 jcfranco

Installed and assigned for verification.

github-actions[bot] avatar May 15 '24 02:05 github-actions[bot]

Repro case: https://github.com/jcfranco/cc-autofocus-missing-from-types

jcfranco avatar May 15 '24 07:05 jcfranco

Verified with https://github.com/jcfranco/cc-autofocus-missing-from-types in 2.8.2 🎉

geospatialem avatar May 15 '24 14:05 geospatialem