Skip to content

Conversation

@tenphi
Copy link
Member

@tenphi tenphi commented Jun 5, 2025

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jun 5, 2025

🦋 Changeset detected

Latest commit: 496a7d6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link

vercel bot commented Jun 5, 2025

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

Name Status Preview Comments Updated (UTC)
cube-ui-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2025 0:21am

@tenphi tenphi requested a review from Copilot June 5, 2025 12:21
@netlify
Copy link

netlify bot commented Jun 5, 2025

Deploy Preview for cube-uikit-docs failed.

Name Link
🔨 Latest commit 496a7d6
🔍 Latest deploy log https://app.netlify.com/projects/cube-uikit-docs/deploys/68418be2a609ae000831e211

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2025

📦 NPM canary release

Deployed canary version 0.0.0-canary-52b5bf6.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2025

🏗 Docs are successfully deployed!

👀 Preview: https://68418c24677316d9e5f8ed2e--cube-uikit-docs.netlify.app

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2025

🧪 Storybook is successfully deployed!

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2025

🏋️ Size limit report

Name Size Passed?
All 252.28 KB (+0.01% 🔺) Yes 🎉
Tree shaking (just a Button) 21.71 KB (0% 🟰) Yes 🎉
Tree shaking (just an Icon) 11.4 KB (0% 🟰) Yes 🎉

Click here if you want to find out what is changed in this build

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for specifying default props on the DialogContainer in the useDialogContainer hook and ensures they’re merged correctly.

  • Introduce and document the defaultContainerProps parameter in the hook signature.
  • Change the spread of container props to mergeProps(defaultContainerProps, containerProps) on the DialogContainer.
  • Remove inappropriate merging of defaultContainerProps into the dialog content component and update effect dependencies to include defaultContainerProps.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/components/overlays/Dialog/dialog-container.tsx Add defaultContainerProps JSDoc, update merge logic for container props, adjust component props spread, and update hook dependencies
.changeset/afraid-mugs-sneeze.md Add patch changeset entry describing the fix to defaultContainerProps handling
Comments suppressed due to low confidence (3)

src/components/overlays/Dialog/dialog-container.tsx:18

  • Specify in the JSDoc that defaultContainerProps is optional and, if possible, reference its generic type (e.g., CP) to make the signature clearer for consumers.
* @param defaultContainerProps - Default props to pass to the DialogContainer.

src/components/overlays/Dialog/dialog-container.tsx:69

  • Introduce unit tests covering scenarios where defaultContainerProps is provided alone, overridden by containerProps, and both combined, to ensure the merged output behaves as intended.
{...mergeProps(defaultContainerProps, containerProps || undefined)}

src/components/overlays/Dialog/dialog-container.tsx:69

  • [nitpick] Since mergeProps already handles undefined, you can simplify this call to mergeProps(defaultContainerProps, containerProps) and drop the || undefined fallback.
{...mergeProps(defaultContainerProps, containerProps || undefined)}

@tenphi tenphi merged commit 31425c9 into main Jun 5, 2025
13 of 17 checks passed
@tenphi tenphi deleted the fix-dialog-container-props branch June 5, 2025 12:26
@github-actions github-actions bot mentioned this pull request Jun 5, 2025
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