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

feat (next): Add ability disable portal for portalled components #1482

Merged
merged 10 commits into from
Nov 20, 2024

Conversation

saturnonearth
Copy link
Contributor

@saturnonearth saturnonearth commented Nov 13, 2024

I added the ability to set portal on dialog content (for both Dialog and AlertDialog). It used to be on Dialog.Root But I didn't know how to add it back there so I just added to Dialog.Content and AlertDialog.Content.

Edit: I added same props to Popover as well.

Copy link
Contributor

github-actions bot commented Nov 13, 2024

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
shadcn-svelte ✅ Ready (View Log) Visit Preview c2b648a

Copy link

changeset-bot bot commented Nov 13, 2024

⚠️ No Changeset found

Latest commit: c2b648a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@huntabyte
Copy link
Owner

In this case, we'd need to add it to all the floating elements, and a more flexible approach would probably be a portalProps type which includes all the possible props to pass to Portal

@saturnonearth
Copy link
Contributor Author

In this case, we'd need to add it to all the floating elements, and a more flexible approach would probably be a portalProps type which includes all the possible props to pass to Portal

Hopefully these modifications are what you wanted?

@huntabyte
Copy link
Owner

@saturnonearth yes, but let's make the name portalProps instead of just portal. Having a portal prop instantly makes me think it's going to be a boolean whereas portalProps is a bit more explicit.

@huntabyte
Copy link
Owner

DropdownMenu and ContextMenu as well right?

@huntabyte
Copy link
Owner

Thanks, man! I think the only one we're missing now is the Menubar?

@saturnonearth
Copy link
Contributor Author

Thanks, man! I think the only one we're missing now is the Menubar?

It appears that the Menubar.Portal Type is missing from bits-ui?

@huntabyte
Copy link
Owner

I'll get that type exported!

Copy link
Owner

@huntabyte huntabyte left a comment

Choose a reason for hiding this comment

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

Thanks a ton dude! @saturnonearth

@huntabyte huntabyte changed the title feat (next): Add ability disable portal for dialogs feat (next): Add ability disable portal for portalled components Nov 20, 2024
@huntabyte huntabyte merged commit 9d35389 into huntabyte:next Nov 20, 2024
4 checks passed
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