Skip to content

fix: hcm progress circle #8487

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

Merged
merged 4 commits into from
Jul 8, 2025
Merged

fix: hcm progress circle #8487

merged 4 commits into from
Jul 8, 2025

Conversation

snowystinger
Copy link
Member

@snowystinger snowystinger commented Jul 4, 2025

Closes RSP Component Milestones (view)

Like progress bar, the circle should be visible even when progress is close to 0, otherwise it can be invisible or hard to tell what it is. Do this by creating an inner and outer stroke for the circle.
Because SVG strokes are half in and half out of the shape (along the path), we can shrink the track by 2px to allow 1px on either side of that path using a hidden extra circle that's invisible in non-hcm cases.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@rspbot
Copy link

rspbot commented Jul 4, 2025

yihuiliao
yihuiliao previously approved these changes Jul 7, 2025
@rspbot
Copy link

rspbot commented Jul 8, 2025

@rspbot
Copy link

rspbot commented Jul 8, 2025

default: `[${pxToRem(3)}]`,
size: {
S: 2,
L: 4
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 these other values are converted to rems in the theme. Borders and strokes use pixels by default, but we chose to use rems for progress circle. So I think you will need to manually convert these too.

@rspbot
Copy link

rspbot commented Jul 8, 2025

@rspbot
Copy link

rspbot commented Jul 8, 2025

## API Changes

react-aria-components

/react-aria-components:DragAndDropOptions

 DragAndDropOptions {
   acceptedDragTypes?: 'all' | Array<string | symbol> = 'all'
   dropTargetDelegate?: DropTargetDelegate
   getAllowedDropOperations?: () => Array<DropOperation>
   getDropOperation?: (DropTarget, DragTypes, Array<DropOperation>) => DropOperation
   getItems?: (Set<Key>) => Array<DragItem> = () => []
   isDisabled?: boolean
   onDragEnd?: (DraggableCollectionEndEvent) => void
   onDragMove?: (DraggableCollectionMoveEvent) => void
   onDragStart?: (DraggableCollectionStartEvent) => void
   onDrop?: (DroppableCollectionDropEvent) => void
   onDropActivate?: (DroppableCollectionActivateEvent) => void
   onDropEnter?: (DroppableCollectionEnterEvent) => void
   onDropExit?: (DroppableCollectionExitEvent) => void
   onInsert?: (DroppableCollectionInsertDropEvent) => void
   onItemDrop?: (DroppableCollectionOnItemDropEvent) => void
   onMove?: (DroppableCollectionReorderEvent) => void
   onReorder?: (DroppableCollectionReorderEvent) => void
   onRootDrop?: (DroppableCollectionRootDropEvent) => void
   renderDragPreview?: (Array<DragItem>) => JSX.Element
-  renderDropIndicator?: (DropTarget, Set<Key>, Key) => JSX.Element
+  renderDropIndicator?: (DropTarget) => JSX.Element
   shouldAcceptItemDrop?: (ItemDropTarget, DragTypes) => boolean
 }

@snowystinger snowystinger added this pull request to the merge queue Jul 8, 2025
Merged via the queue into main with commit 7548779 Jul 8, 2025
31 checks passed
@snowystinger snowystinger deleted the fix-hcm-progress-circle branch July 8, 2025 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants