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

Assigning deprecated half value causes TypeScript errors #10934

Closed
2 of 6 tasks
jcfranco opened this issue Dec 2, 2024 · 2 comments
Closed
2 of 6 tasks

Assigning deprecated half value causes TypeScript errors #10934

jcfranco opened this issue Dec 2, 2024 · 2 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 1 Very small fix or change (potentially a single line), doesn't require updates to tests. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone no changelog entry Use the commit override to avoid a changelog entry p - high Issue should be addressed in the current milestone, impacts component or core functionality regression Issues that are caused by changes in a release, but were working before that.

Comments

@jcfranco
Copy link
Member

jcfranco commented Dec 2, 2024

Check existing issues

Actual Behavior

#10786 should include half in the updated types. Exclude also needs to be corrected to be:

Extract<Width, "auto" | "full" | "half">;

instead of

Extract<"auto" | "full" | "half", Width>;

See https://www.typescriptlang.org/docs/handbook/utility-types.html#extracttype-union.

Expected Behavior

Deprecated half is still valid in types.

Reproduction Sample

https://stackblitz.com/edit/github-fxftrg?file=main.ts

Reproduction Steps

Open the repro case and notice the TS error.

Reproduction Version

3.0.0-next.40

Relevant Info

No response

Regression?

2.13.2

Priority impact

impact - p1 - need for current milestone

Impact

This will cause TS errors for existing use of the deprecated value.

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/calcite-ui-icons
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Online

@jcfranco jcfranco added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. p - high Issue should be addressed in the current milestone, impacts component or core functionality 1 - assigned Issues that are assigned to a sprint and a team member. regression Issues that are caused by changes in a release, but were working before that. estimate - 1 Very small fix or change (potentially a single line), doesn't require updates to tests. labels Dec 2, 2024
@jcfranco jcfranco added this to the 2024-12-17 - Dec Milestone milestone Dec 2, 2024
@github-actions github-actions bot added ArcGIS Online Issues logged by ArcGIS Online team members. calcite-components Issues specific to the @esri/calcite-components package. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone labels Dec 2, 2024
@geospatialem geospatialem added the no changelog entry Use the commit override to avoid a changelog entry label Dec 2, 2024
@Elijbet Elijbet added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Dec 2, 2024
Elijbet added a commit that referenced this issue Dec 3, 2024
…it-button): fix width types (#10937)

**Related Issue:** #10934

## Summary
Include `half` in the updated types. Fix `width` types.
@Elijbet Elijbet added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Dec 3, 2024
Copy link
Contributor

github-actions bot commented Dec 3, 2024

Installed and assigned for verification.

@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Dec 3, 2024
@geospatialem
Copy link
Member

Verified in 3.0.0-next.46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 1 Very small fix or change (potentially a single line), doesn't require updates to tests. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone no changelog entry Use the commit override to avoid a changelog entry p - high Issue should be addressed in the current milestone, impacts component or core functionality regression Issues that are caused by changes in a release, but were working before that.
Projects
None yet
Development

No branches or pull requests

4 participants