Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

dchyun
Copy link
Contributor

@dchyun dchyun commented Sep 18, 2025

πŸ“Œ Summary

If merged, this PR would update the type of the STATUSES export in the StepperList::Step to fix linting issues.

πŸ› οΈ Detailed description

Originally this PR was to update an incorrect import path in the showcase pages of the StepperList. Upon fixing this path, however a new linting error was thrown in the showcase.

Screenshot 2025-09-18 at 3 22 45β€―PM

Upon further investigation, this linting error is due to the type of the STATUES export of the StepperList. The type of STATUSES is set to string[], but the @status argument of the component is typed as the component specific type HdsStepperStatuses. When using STATUSES in the showcase examples this then causes a type mismatch.

 {{#each STATUSES as |status|}}
      <SG.Item @label="{{capitalize status}}">
        <HdsStepperList @ariaLabel="Label" as |S|>
          <S.Step @status={{status}}>
          ...

To fix this issue, the type of the export STATUSES was updated from string[] to HdsStepperStatuses[]

export enum HdsStepperStatusesValues {
  Incomplete = 'incomplete',
  Progress = 'progress',
  Processing = 'processing',
  Complete = 'complete',
}

export type HdsStepperStatuses = `${HdsStepperStatusesValues}`;

Potential follow-ups

In the component library, the majority of exported arrays of possible values for an argument are typed as the custom type for that component. However, there are various exports that follow this same pattern of typing the export as string[]. These exports will most likely run into the same type issues as those found here.

An effort could be taken to update these types to follow the changes made here.

Example from the Separator component

export const SPACING: string[] = Object.values(HdsSeparatorSpacingValues);

πŸ‘€ Component checklist

πŸ’¬ Please consider using conventional comments when reviewing this PR.

πŸ“‹ PCI review checklist
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've worked with GRC to document the impact of any changes to security controls.
    Examples of changes to controls include access controls, encryption, logging, etc.
  • If applicable, I've worked with GRC to ensure compliance due to a significant change to the in-scope PCI environment.
    Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.

Copy link

vercel bot commented Sep 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
hds-showcase Ready Ready Preview Sep 18, 2025 7:52pm
hds-website Ready Ready Preview Sep 18, 2025 7:52pm

Copy link
Contributor

@didoo didoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have a changelog?

@dchyun
Copy link
Contributor Author

dchyun commented Sep 19, 2025

Should this have a changelog?

@didoo I think we should be okay without one. There were similar type fixes made recently to exports in #3054 and we didn't add a changeset there.

@dchyun dchyun merged commit 4448ba1 into main Sep 19, 2025
15 of 16 checks passed
@dchyun dchyun deleted the dchyun/stepper-list-statuses-type-fix branch September 19, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants