Skip to content

Conversation

shleewhite
Copy link
Contributor

@shleewhite shleewhite commented May 27, 2025

πŸ“Œ Summary

If merged, this PR would fix an issue with unused arguments being required for the AppSideNav and SideNav components.

πŸ› οΈ Detailed description

Currently, the component throws type errors that @target is required for Hds::AppSideNav/SideNav::Portal and @name is required for Hds::AppSideNav/SideNav::Portal::Target.

This is because the types for Portal and Portal::Target are a union of the types from ember-stargate and our own args. For our components, we expose the targetName argument as the way consumers can change the name or target argument.

I decided to delete the PortalSignature and PortalTarget signatures entirely because none of those args are passed to the components so if a consumer used them it wouldn't do anything.

Example Hds::AppSideNav::Portal

Notice @target, @renderInPlace, and @fallback are not forwarded to the Portal component.

handlebars
Screenshot 2025-05-27 at 4 27 04β€―PM

types
Screenshot 2025-05-27 at 4 28 25β€―PM

πŸ”— External links


πŸ‘€ Component checklist

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

Copy link

vercel bot commented May 27, 2025

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
hds-showcase βœ… Ready (Inspect) Visit Preview May 28, 2025 1:33pm
hds-website βœ… Ready (Inspect) Visit Preview May 28, 2025 1:33pm

Copy link
Contributor

πŸ“¦ RC Packages Published

Latest commit: 112b8b9

Published 1 packages

@hashicorp/[email protected]

yarn up -C @hashicorp/design-system-components@rc

Copy link
Contributor

πŸ“¦ RC Packages Published

Latest commit: 112b8b9

Published 1 packages

@hashicorp/[email protected]

yarn up -C @hashicorp/design-system-components@rc

@shleewhite shleewhite requested a review from didoo May 27, 2025 20:25
@shleewhite shleewhite removed the release-candidate Publishes release candidates to npm label May 27, 2025
@shleewhite shleewhite marked this pull request as ready for review May 28, 2025 13:14
@shleewhite shleewhite requested a review from a team as a code owner May 28, 2025 13:14
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.

From a code perspective, everything makes sense (my previous porting to TS was not correct, I see only now)

According to the internal guidance, we should have a changeset associated with the change.

Also, not sure if we should test with at least one consumer (Cloud UI?) to make sure the build works. I'll leave it to you to decide if it's worth it or not.

@shleewhite
Copy link
Contributor Author

Also, not sure if we should test with at least one consumer (Cloud UI?) to make sure the build works. I'll leave it to you to decide if it's worth it or not.

@didoo Yup! I have been working with @venusang and tested it in her spike branch implementing Enterprise Nav to verify that it works.

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.

Nice PR! πŸ‘Œ

Copy link
Contributor

@KristinLBradley KristinLBradley left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning these up!

@shleewhite shleewhite merged commit 5512735 into main May 28, 2025
17 of 18 checks passed
@shleewhite shleewhite deleted the fix/app-side-nav-types branch May 28, 2025 18:27
@hashibot-hds hashibot-hds mentioned this pull request May 28, 2025
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.

4 participants