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

DSD-1798: Add labelPlacement prop to ProgressIndicator #1680

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

jackiequach
Copy link
Collaborator

@jackiequach jackiequach commented Oct 4, 2024

Fixes JIRA ticket DSD-1798

This PR does the following:

  • Adds labelPlacement prop to the ProgressIndicator component to allow users to set the placement of labels relative to the indicator. It is only applicable to the circular variant.

How has this been tested?

  • Locally in Storybook

Accessibility concerns or updates

Accessibility Checklist

  • Checked Storybook's "Accessibility" tab for color contrast and other issues.
  • The feature works with keyboard inputs including tabbing back and forward and pressing space, enter, arrow, and esc keys.
  • For hidden text or when aria-live is used, a screenreader was used to verify the text is read.
  • For features that involve UI updates and focusing on DOM refs, focus management was reviewed.
  • The feature works when the page is zoomed in to 200% and 400%.

Open Questions

Checklist:

  • I have updated the Storybook documentation and changelog accordingly.
  • I have added relevant accessibility documentation for this pull request.
  • All new and existing tests passed.

Front End Review:

  • Review the Vercel preview deployment once it is ready.

Copy link

vercel bot commented Oct 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nypl-design-system ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 4, 2024 8:09pm

Copy link
Member

@EdwinGuzman EdwinGuzman left a comment

Choose a reason for hiding this comment

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

Looks good but minor comments regarding documentation. I think the ticket needs to be updated to reflect these changes for the AC.

@@ -95,7 +99,7 @@ export const ProgressIndicator: ChakraComponent<
if (indicatorType === "circular") {
// For the small size, since the label won't be visible, we need to add
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this comment is true anymore since the circular small size variant does display the label on the right side.

@@ -107,8 +111,14 @@ export const ProgressIndicator: ChakraComponent<
</ChakraCircularProgressLabel>
)}
</ChakraCircularProgress>
{showLabel && size !== "small" && (
<Label id={`${id}-label`} htmlFor={id}>
{showLabel && (size !== "small" || labelPlacement === "right") && (
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a few more examples in the storybook doc section? The current example shows size="small" and labelPlacement="right", but it'd be good to see others such as the regular size and labelPlacement="right".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants