Skip to content

chore: Dialog-container-into-UI-step-final#3299

Merged
MichaelUnkey merged 14 commits intomainfrom
Dialog-container-into-UI-step-3
Jun 5, 2025
Merged

chore: Dialog-container-into-UI-step-final#3299
MichaelUnkey merged 14 commits intomainfrom
Dialog-container-into-UI-step-3

Conversation

@MichaelUnkey
Copy link
Collaborator

@MichaelUnkey MichaelUnkey commented Jun 5, 2025

What does this PR do?

Fixes # (issue)

If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  1. Files changed still match Prod
  2. Dashboard has no errors caused by removing old dialog files in dashboard

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand areas
  • Ran pnpm build
  • Ran pnpm fmt
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Unkey Docs if changes were necessary

Summary by CodeRabbit

  • Refactor
    • Unified the source of dialog-related UI components to a single external library, improving consistency across the dashboard.
    • Removed custom dialog components and related files, streamlining the codebase and reducing redundancy.

No changes to user-facing functionality or behavior.

@changeset-bot
Copy link

changeset-bot bot commented Jun 5, 2025

⚠️ No Changeset found

Latest commit: 6da257c

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

@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)
dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2025 3:15pm
engineering ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2025 3:15pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 5, 2025

📝 Walkthrough

Walkthrough

This change removes the local implementation and re-exports of the DialogContainer component and its related dialog part components. All references in the codebase are updated to import DialogContainer directly from the external @unkey/ui package, consolidating UI component imports and eliminating the now-unnecessary local files.

Changes

Files/Paths (grouped) Change Summary
apps/dashboard/app/(app)/authorization/_components/rbac-form.tsx
.../delete-permission.tsx
.../delete-role.tsx
.../ratelimits/[namespaceId]/_components/delete-dialog.tsx
.../identifier-dialog.tsx
.../namespace-delete-dialog.tsx
.../ratelimits/_components/create-namespace-button.tsx
.../settings/billing/components/confirmation.tsx
.../settings/team/invite.tsx
.../auth/sign-in/org-selector.tsx
.../components/dashboard/confirm.tsx
.../components/dashboard/feedback-component.tsx
Updated imports to use DialogContainer from @unkey/ui instead of a local component; consolidated import statements.
apps/dashboard/components/dialog-container.tsx Deleted file; previously re-exported DialogContainer for backward compatibility.
apps/dashboard/components/dialog-container/dialog-container.tsx Deleted file; contained the local implementation of DialogContainer and re-exports of dialog part components.
apps/dashboard/components/dialog-container/dialog-parts.tsx Deleted file; contained the local implementation of dialog part components (DefaultDialogHeader, etc.).

Sequence Diagram(s)

Not applicable as the changes are limited to import source refactoring and component deletions without changes to control flow or feature logic.

Possibly related PRs

Suggested labels

🕹️ oss.gg, Needs Approval

Suggested reviewers

  • mcstepp
  • chronark
  • perkinsjr
  • ogzhanolguncu

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a742ce and 6da257c.

📒 Files selected for processing (15)
  • apps/dashboard/app/(app)/authorization/_components/rbac-form.tsx (1 hunks)
  • apps/dashboard/app/(app)/authorization/permissions/[permissionId]/delete-permission.tsx (1 hunks)
  • apps/dashboard/app/(app)/authorization/roles/[roleId]/delete-role.tsx (1 hunks)
  • apps/dashboard/app/(app)/ratelimits/[namespaceId]/_components/delete-dialog.tsx (1 hunks)
  • apps/dashboard/app/(app)/ratelimits/[namespaceId]/_components/identifier-dialog.tsx (1 hunks)
  • apps/dashboard/app/(app)/ratelimits/[namespaceId]/_components/namespace-delete-dialog.tsx (1 hunks)
  • apps/dashboard/app/(app)/ratelimits/_components/create-namespace-button.tsx (1 hunks)
  • apps/dashboard/app/(app)/settings/billing/components/confirmation.tsx (1 hunks)
  • apps/dashboard/app/(app)/settings/team/invite.tsx (1 hunks)
  • apps/dashboard/app/auth/sign-in/org-selector.tsx (1 hunks)
  • apps/dashboard/components/dashboard/confirm.tsx (1 hunks)
  • apps/dashboard/components/dashboard/feedback-component.tsx (1 hunks)
  • apps/dashboard/components/dialog-container.tsx (0 hunks)
  • apps/dashboard/components/dialog-container/dialog-container.tsx (0 hunks)
  • apps/dashboard/components/dialog-container/dialog-parts.tsx (0 hunks)
💤 Files with no reviewable changes (3)
  • apps/dashboard/components/dialog-container.tsx
  • apps/dashboard/components/dialog-container/dialog-container.tsx
  • apps/dashboard/components/dialog-container/dialog-parts.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test Packages / Test ./internal/clickhouse
🔇 Additional comments (12)
apps/dashboard/app/(app)/settings/billing/components/confirmation.tsx (1)

3-3: LGTM: Clean import consolidation.

The consolidation of DialogContainer import from local path to @unkey/ui package is correct and aligns with the refactoring objectives. No functional changes to the component.

apps/dashboard/components/dashboard/confirm.tsx (1)

3-3: LGTM: Consistent import consolidation.

The import consolidation follows the same correct pattern as other files in this refactor, moving from local DialogContainer import to the external @unkey/ui package.

apps/dashboard/app/(app)/ratelimits/_components/create-namespace-button.tsx (1)

8-8: LGTM: Proper UI component consolidation.

The consolidation of Button, DialogContainer, and FormInput imports to the @unkey/ui package is correct and maintains all existing functionality while improving dependency organization.

apps/dashboard/app/(app)/ratelimits/[namespaceId]/_components/identifier-dialog.tsx (1)

9-9: LGTM: Refactoring completed consistently.

The final import consolidation maintains the complex form and dialog functionality while successfully moving to the external UI package. All files in this PR show consistent and correct refactoring.

apps/dashboard/app/(app)/authorization/_components/rbac-form.tsx (1)

7-7: Consolidated DialogContainer import from @unkey/ui.
Local DialogContainer, Button, FormInput, and FormTextarea imports have been updated to use the external UI library, aligning with the broader refactor.

apps/dashboard/app/(app)/ratelimits/[namespaceId]/_components/namespace-delete-dialog.tsx (1)

8-8: Consolidated DialogContainer import from @unkey/ui.
Local DialogContainer, Button, and Input imports have been updated to use the external UI library, aligning with the broader refactor.

apps/dashboard/app/(app)/ratelimits/[namespaceId]/_components/delete-dialog.tsx (1)

6-6: Consolidated DialogContainer import from @unkey/ui.
Local DialogContainer, Button, and Input imports have been updated to use the external UI library, aligning with the broader refactor.

apps/dashboard/app/(app)/authorization/permissions/[permissionId]/delete-permission.tsx (1)

6-6: Consolidated DialogContainer import from @unkey/ui.
Local DialogContainer, Button, and Input imports have been updated to use the external UI library, aligning with the broader refactor.

apps/dashboard/app/(app)/authorization/roles/[roleId]/delete-role.tsx (1)

5-5: Consolidated DialogContainer import from @unkey/ui.
Local DialogContainer, Button, and Input imports have been updated to use the external UI library, aligning with the broader refactor.

apps/dashboard/app/auth/sign-in/org-selector.tsx (1)

4-4: LGTM! Clean import consolidation.

The consolidation of Button and DialogContainer imports from the same @unkey/ui package improves import organization and removes dependency on local components as intended.

apps/dashboard/app/(app)/settings/team/invite.tsx (1)

9-10: LGTM! Consistent import refactoring.

The import consolidation maintains consistency with the refactoring effort and properly groups related UI components from the same package.

apps/dashboard/components/dashboard/feedback-component.tsx (1)

8-9: LGTM! Refactoring completed successfully.

The import consolidation is consistent with the broader refactoring effort. All DialogContainer usages maintain the same API, confirming smooth migration from local to external UI components.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2025

Thank you for following the naming conventions for pull request titles! 🙏

@MichaelUnkey MichaelUnkey added this pull request to the merge queue Jun 5, 2025
Merged via the queue into main with commit 39f8ddf Jun 5, 2025
31 of 32 checks passed
@MichaelUnkey MichaelUnkey deleted the Dialog-container-into-UI-step-3 branch June 5, 2025 15:29
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