Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
270 stars 75 forks source link

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

Closed hcampos-professional closed 1 month ago

hcampos-professional commented 2 months ago

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

Esri team

ArcGIS Maps SDK for JavaScript

geospatialem commented 2 months ago

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.

jcfranco commented 2 months ago

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.

geospatialem commented 2 months ago

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

github-actions[bot] commented 2 months ago

Installed and assigned for verification.

DitwanP commented 1 month ago

🍡 Verified locally on hotfix

jcfranco commented 1 month ago

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

github-actions[bot] commented 1 month ago

Installed and assigned for verification.

jcfranco commented 1 month ago

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

geospatialem commented 1 month ago

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