Skip to content

Conversation

@dchyun
Copy link
Contributor

@dchyun dchyun commented Jul 10, 2025

๐Ÿ“Œ Summary

If merged, this PR would fix a type issue with FloatingUIOptions in the hds-anchored-position modifier originally caught in #3004

๐Ÿ› ๏ธ Detailed description

In testing the typescript conversion of the PopoverPrimitive linting errors were thrown when the arrowSelector option was used.
Screenshot 2025-07-10 at 12 40 33โ€ฏPM

This is due to the fact that the Named argument of the hds-anchored-position modifier includes the FloatingUIOptions type plus an optional string arrowSelector. However, the PopoverPrimitive, which uses the modifier, the Named argument is set to the FloatingUIOptions. This type mismatch causes a type error whenever arrowSelector is used.

To solve this issue I created a new type HdsAnchoredPositionOptions, which encapsulates this additional string argument.

Any components that leveraged the hds-anchored-position modifier and the FloatingUIOptions type were updated to use the HdsAnchoredPositionOptions instead.

๐Ÿ”— External links

Jira ticket: HDS-5091


๐Ÿ‘€ Component checklist

  • Percy was checked for any visual regression

๐Ÿ’ฌ 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.

@vercel
Copy link

vercel bot commented Jul 10, 2025

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Updated (UTC)
hds-showcase โœ… Ready (Inspect) Visit Preview Jul 14, 2025 2:41pm
hds-website โœ… Ready (Inspect) Visit Preview Jul 14, 2025 2:41pm

shleewhite
shleewhite previously approved these changes Jul 10, 2025
Copy link
Contributor

@shleewhite shleewhite left a comment

Choose a reason for hiding this comment

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

This looks good! Likely does need a changeset though because this changes an exported type slightly.

shleewhite
shleewhite previously approved these changes Jul 11, 2025
zamoore
zamoore previously approved these changes Jul 11, 2025
didoo
didoo previously approved these changes Jul 14, 2025
@dchyun dchyun dismissed stale reviews from didoo and zamoore via 9f9adb5 July 14, 2025 14:37
@dchyun dchyun requested a review from didoo July 14, 2025 14:39
@dchyun dchyun merged commit 59db056 into main Jul 14, 2025
16 checks passed
@dchyun dchyun deleted the dchyun/fix-anchored-position-types branch July 14, 2025 15:12
@hashibot-hds hashibot-hds mentioned this pull request Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-website Content updates to the documentation website packages/components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants