Skip to content

Conversation

@kingston
Copy link
Collaborator

@kingston kingston commented Mar 21, 2025

Summary by CodeRabbit

  • New Features

    • Introduced updated UI elements for consistent and modern visual feedback, including a new destructive button style.
    • Enhanced error messaging with dynamic content in app editing interfaces.
  • Refactor

    • Replaced legacy components with streamlined, modern UI counterparts across forms, dialogs, and navigation menus.
    • Standardized component usage and import paths to ensure a cohesive look and feel.
  • Chores

    • Removed outdated dependencies and deprecated components for improved performance and maintainability.

@linear
Copy link

linear bot commented Mar 21, 2025

@changeset-bot
Copy link

changeset-bot bot commented Mar 21, 2025

🦋 Changeset detected

Latest commit: 95774ef

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

This PR includes changesets to release 3 packages
Name Type
@halfdomelabs/project-builder-web Patch
@halfdomelabs/project-builder-cli Patch
@halfdomelabs/project-builder-test 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

@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 2025

Walkthrough

This pull request introduces a new changeset document outlining a patch and updates the project by removing an obsolete dependency. Multiple files have been refactored to consolidate and update import paths, switching from relative paths to an alias. Several legacy UI components and their subcomponents have been removed, with many components now replaced by updated versions from the new UI library. Additionally, export declarations have been reorganized, and minor style or class name adjustments have been made across various forms and pages.

Changes

File(s) Change Summary
.changeset/smooth-ducks-crash.md
packages/project-builder-web/package.json
Added a changelog document; removed dependency @headlessui/[email protected].
packages/project-builder-web/src/app/App.tsx
.../ProjectDefinitionProvider.tsx
.../ProjectSelectorDialog.tsx
.../ProjectSelectorGate.tsx
.../EnumValuesSection.tsx
.../ServiceEmbeddedRelationForm.tsx
.../_layout.tsx
Consolidated and updated import statements; switched from relative paths (src/...) to alias (@src/...).
.../ProjectSyncModal.tsx
.../ClientVersionProvider.test.tsx
.../ErrorBoundary/ErrorBoundary.tsx
Reintroduced missing imports (e.g., startSync, formatError, logError, getVersionInfo).
.../Alert/index.tsx
.../AlertIcon/index.tsx
.../Button/index.tsx
.../CheckedArrayInput/index.tsx
.../CheckedInput/index.tsx
.../FormError/index.tsx
.../FormLabel/index.tsx
.../LinkButton/index.tsx
.../Modal/index.tsx
.../SelectInput/index.tsx
.../Sidebar/index.tsx
.../Table/index.tsx
.../TextInput/index.tsx
Removed deprecated UI components and their subcomponents, eliminating outdated implementations.
.../CollapsibleRow/CollapsibleRow.tsx
.../EmbeddedListInput/EmbeddedListInput.tsx
Updated export signatures; replaced removed components (e.g. LinkButton) with new UI components from @halfdomelabs/ui-components; adjusted prop names and values.
.../src/components/index.ts Removed default exports of removed components; added wildcard exports for refactored components such as CollapsibleRow, ErrorBoundary, NotFoundCard, and others.
.../src/hooks/useStatus.ts
.../src/services/error-formatter.ts
Removed the custom useStatus hook; updated import path for the UserVisibleError utility from a relative to an alias-based path.
Multiple files under .../src/pages/apps/edit/
.../src/pages/data/models/edit/[id]/
.../src/pages/features/auth/
.../src/pages/settings/
.../src/pages/data/enums/edit/
Revised page components to use updated UI components (e.g. switching from TextInput to InputField, CheckedInput to CheckboxField, etc.), adjusted class names, and consolidated import statements using the new alias and component library.
packages/ui-components/src/styles/button.ts Added a new variant (destructiveLink) to the button style definitions.

🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

@socket-security
Copy link

socket-security bot commented Mar 21, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@changesets/[email protected] Transitive: environment, filesystem, network +5 332 kB andarist, changesets-release-bot, emmatown, ...1 more
npm/@changesets/[email protected] Transitive: environment, eval, filesystem, shell, unsafe +81 15.8 MB andarist, changesets-release-bot, emmatown, ...1 more
npm/@dnd-kit/[email protected] environment +1 1.07 MB clauderic
npm/@dnd-kit/[email protected] environment 0 48.1 kB clauderic
npm/@dnd-kit/[email protected] environment 0 233 kB clauderic
npm/@dnd-kit/[email protected] environment 0 88.5 kB clauderic
npm/@eslint/[email protected]9.21.0 None 0 14.9 kB eslintbot, openjsfoundation
npm/@fastify/[email protected] Transitive: environment +5 244 kB eomm
npm/@headlessui/[email protected] environment 0 10.3 kB malfaitrobin
npm/@inquirer/[email protected] Transitive: environment, filesystem, shell +21 943 kB sboudrias
npm/@originjs/[email protected] filesystem +4 732 kB flyfishzy
npm/@prisma/[email protected] environment, eval, filesystem, network, shell +11 8.79 MB prismabot
npm/@radix-ui/[email protected] None +10 187 kB chancestrickland
npm/@radix-ui/[email protected] None +19 548 kB chancestrickland
npm/@radix-ui/[email protected] None +32 1.52 MB chancestrickland
npm/@radix-ui/[email protected] None +1 30.8 kB andy-hook, benoitgrelard, chancestrickland, ...3 more
npm/@radix-ui/[email protected] None +15 482 kB chancestrickland
npm/@radix-ui/[email protected] None +28 1.16 MB chancestrickland
npm/@radix-ui/[email protected] None +9 322 kB chancestrickland
npm/@radix-ui/[email protected] None +32 1.41 MB chancestrickland
npm/@radix-ui/[email protected] None +1 34.6 kB andy-hook, benoitgrelard, chancestrickland, ...3 more
npm/@radix-ui/[email protected] None +1 37.6 kB andy-hook, benoitgrelard, chancestrickland, ...3 more
npm/@radix-ui/[email protected] None +9 141 kB andy-hook, benoitgrelard, chancestrickland, ...3 more
npm/@radix-ui/[email protected] None +12 282 kB chancestrickland
npm/@radix-ui/[email protected] None +22 985 kB andy-hook, benoitgrelard, chancestrickland, ...3 more
npm/@storybook/[email protected] None +4 2.3 MB storybook-bot
npm/@storybook/[email protected] Transitive: environment +16 3.71 MB storybook-bot
npm/@storybook/[email protected] Transitive: environment +8 3.69 MB storybook-bot
npm/@storybook/[email protected] None +1 24.1 kB storybook-bot
npm/@storybook/[email protected] None +1 1.84 MB domyen, ghengeveld, jreinhold, ...9 more
npm/@storybook/[email protected] None 0 1.29 kB storybook-bot
npm/@storybook/[email protected] Transitive: environment, filesystem, shell +78 15 MB storybook-bot
npm/@storybook/[email protected] None +4 1.75 MB domyen, ghengeveld, jreinhold, ...9 more
npm/@storybook/[email protected] Transitive: environment +29 6.17 MB domyen, ghengeveld, jreinhold, ...9 more
npm/@storybook/[email protected] None 0 1.58 kB domyen, ghengeveld, jreinhold, ...9 more
npm/@testing-library/[email protected] environment Transitive: eval +19 3.66 MB testing-library-bot
npm/@testing-library/[email protected] None +11 2.43 MB testing-library-bot
npm/@testing-library/[email protected] None +2 614 kB brrianalexis, cmckinstry, dfcook, ...13 more
npm/@testing-library/[email protected] None 0 438 kB brrianalexis, cmckinstry, dfcook, ...13 more
npm/@trpc/[email protected] network 0 253 kB katt
npm/@trpc/[email protected] environment 0 713 kB katt
npm/@tsconfig/[email protected] None 0 2.36 kB typescript-deploys
npm/@tsconfig/[email protected] None 0 3.02 kB typescript-deploys
npm/@types/[email protected] None 0 91.7 kB types
npm/@types/[email protected] None 0 16.9 kB types
npm/@types/[email protected] None 0 2.77 kB types
npm/@types/[email protected] None +3 257 kB types
npm/@types/[email protected] None +3 256 kB types
npm/@types/[email protected] None 0 3.06 kB types
npm/@types/[email protected] None 0 3.2 kB types
npm/@types/[email protected]20.12.7 None 0 2.03 MB types
npm/@types/[email protected] None 0 49.8 kB types
npm/@types/[email protected] None 0 23.3 kB types
npm/@types/[email protected] None 0 5.02 kB types
npm/@typescript-eslint/[email protected], 7.18.08.26.0 Transitive: environment, filesystem +27 2.07 MB
npm/@vitest/[email protected] None 0 283 kB veritemm
npm/[email protected] None 0 56.7 kB ionicabizau
npm/[email protected] network Transitive: environment, filesystem +8 2.5 MB jasonsaayman
npm/[email protected] None 0 43.7 kB sindresorhus
npm/[email protected]5.4.4 None 0 35.9 kB blakeembrey
npm/[email protected] Transitive: environment, filesystem +11 740 kB bmishkin
npm/[email protected] environment, filesystem +1 202 kB paulmillr
npm/[email protected] None 0 22.1 kB joebell93
npm/[email protected] None +4 126 kB dipnpm, paco
npm/[email protected] environment 0 186 kB abetomo
npm/[email protected] environment, filesystem, shell +7 6.45 MB gustavohenke
npm/[email protected] filesystem Transitive: environment, shell +30 3.69 MB bret
npm/[email protected] None 0 1.11 MB danburzo
npm/[email protected]16.4.5 None 0 79.1 kB motdotla
npm/[email protected] eval, filesystem Transitive: environment, shell +13 1.34 MB mde
npm/[email protected] None 0 2.56 MB toss-build-bot
npm/[email protected]3.7.0 Transitive: environment, filesystem, unsafe +23 956 kB jounqin
npm/[email protected] Transitive: environment, filesystem +21 2.64 MB jounqin
npm/[email protected]6.10.2 Transitive: eval +74 9.56 MB ljharb
npm/[email protected] Transitive: environment +2 542 kB azat-io
npm/[email protected]5.1.0 None 0 169 kB react-bot
npm/[email protected]7.37.2 Transitive: environment, eval +83 5.71 MB ljharb
npm/[email protected] filesystem +1 186 kB yannbf
npm/[email protected] Transitive: environment, filesystem +19 963 kB francoismassart
npm/[email protected] Transitive: environment, filesystem, unsafe +44 6.52 MB sindresorhus
npm/[email protected]9.21.0 Transitive: eval, shell, unsafe +72 9.5 MB eslintbot
npm/[email protected] None 0 272 kB nebrelbug
npm/[email protected] environment Transitive: filesystem, shell +17 589 kB ehmicky
npm/[email protected] None 0 159 kB mountain-jack
npm/[email protected] None 0 25.2 kB kibertoad
npm/[email protected] Transitive: filesystem +20 579 kB sindresorhus
npm/[email protected] environment 0 627 kB mweststrate
npm/[email protected] None 0 4.74 kB sindresorhus
npm/[email protected] None 0 90.4 kB patcher56
npm/[email protected]2.15.1 None +2 72.9 kB ljharb
npm/[email protected] None +1 11.8 MB catamphetamine
npm/[email protected] Transitive: environment, filesystem, network +27 8.04 MB domenic, joris-van-der-wel, sebmaster, ...3 more
npm/[email protected] environment, eval Transitive: filesystem, shell +40 5.58 MB webpro
npm/[email protected] None +4 2.35 MB streamich
npm/[email protected] None 0 137 kB broofa
npm/[email protected] None 0 11 kB ai
npm/[email protected] None 0 110 kB bhousel
npm/[email protected] environment +8 86.7 kB sindresorhus
npm/[email protected]8.0.1 environment +10 104 kB sindresorhus
npm/[email protected] None 0 8.23 kB sindresorhus
npm/[email protected] None +1 12.1 kB sindresorhus
npm/[email protected] Transitive: environment, filesystem +5 217 kB ryanzim
npm/[email protected] None +3 59.8 kB marceloucker
npm/[email protected] environment, filesystem +2 261 kB ai
npm/[email protected]2.5.6 None 0 5.55 kB matzkoh
npm/[email protected]0.6.9 None 0 2.67 MB thecrypticace
npm/[email protected]3.4.2 None 0 7.83 MB prettier-bot
npm/[email protected] None 0 391 kB omgovich
npm/[email protected]5.5.0 None 0 86.2 MB kamijin_fanta
npm/[email protected] Transitive: environment +8 3.71 MB catamphetamine
npm/[email protected]7.7.1 None 0 96.7 kB npm-cli-ops

🚮 Removed packages: npm/@apollo/[email protected], npm/@envelop/[email protected], npm/@envelop/[email protected], npm/@envelop/[email protected], npm/@fastify/[email protected], npm/@fastify/[email protected], npm/@graphql-codegen/[email protected], npm/@graphql-codegen/[email protected], npm/@graphql-codegen/[email protected], npm/@graphql-codegen/[email protected], npm/@headlessui/[email protected], npm/@parcel/[email protected], npm/@pothos/[email protected], npm/@pothos/[email protected], npm/@pothos/[email protected], npm/@pothos/[email protected], npm/@pothos/[email protected], npm/@pothos/[email protected], npm/@prisma/[email protected], npm/@prisma/[email protected], npm/@sentry/[email protected], npm/@sentry/[email protected], npm/@sentry/[email protected], npm/@sentry/[email protected], npm/@sentry/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/project-builder-web/src/pages/apps/edit/admin/crud/AdminCrudEmbeddedForm.tsx (1)

123-125: Error handling improved with toast notifications

The error handling has been improved by using toast.error instead of setError. This provides a better user experience with visual feedback.

However, consider adding more specific error messages based on the type of error encountered.

- toast.error(logAndFormatError(error));
+ toast.error(logAndFormatError(error, 'Failed to save embedded form'));
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 249fe46 and 95774ef.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (54)
  • .changeset/smooth-ducks-crash.md (1 hunks)
  • packages/project-builder-web/package.json (0 hunks)
  • packages/project-builder-web/src/app/App.tsx (1 hunks)
  • packages/project-builder-web/src/app/AppLayout/ProjectSyncModal.tsx (1 hunks)
  • packages/project-builder-web/src/app/ClientVersionProvider/ClientVersionProvider.test.tsx (1 hunks)
  • packages/project-builder-web/src/app/ProjectDefinitionProvider/ProjectDefinitionProvider.tsx (1 hunks)
  • packages/project-builder-web/src/app/ProjectSelectorGate/ProjectSelectorDialog.tsx (1 hunks)
  • packages/project-builder-web/src/app/ProjectSelectorGate/ProjectSelectorGate.tsx (1 hunks)
  • packages/project-builder-web/src/components/Alert/index.tsx (0 hunks)
  • packages/project-builder-web/src/components/AlertIcon/index.tsx (0 hunks)
  • packages/project-builder-web/src/components/Button/index.tsx (0 hunks)
  • packages/project-builder-web/src/components/CheckedArrayInput/index.tsx (0 hunks)
  • packages/project-builder-web/src/components/CheckedInput/index.tsx (0 hunks)
  • packages/project-builder-web/src/components/CollapsibleRow/CollapsibleRow.tsx (3 hunks)
  • packages/project-builder-web/src/components/EmbeddedListInput/EmbeddedListInput.tsx (5 hunks)
  • packages/project-builder-web/src/components/ErrorBoundary/ErrorBoundary.tsx (1 hunks)
  • packages/project-builder-web/src/components/FormActionBar/FormActionBar.tsx (1 hunks)
  • packages/project-builder-web/src/components/FormError/index.tsx (0 hunks)
  • packages/project-builder-web/src/components/FormLabel/index.tsx (0 hunks)
  • packages/project-builder-web/src/components/LinkButton/index.tsx (0 hunks)
  • packages/project-builder-web/src/components/Modal/index.tsx (0 hunks)
  • packages/project-builder-web/src/components/NotFoundCard/NotFoundCard.tsx (1 hunks)
  • packages/project-builder-web/src/components/SelectInput/index.tsx (0 hunks)
  • packages/project-builder-web/src/components/Sidebar/index.tsx (0 hunks)
  • packages/project-builder-web/src/components/Table/index.tsx (0 hunks)
  • packages/project-builder-web/src/components/TextInput/index.tsx (0 hunks)
  • packages/project-builder-web/src/components/index.ts (1 hunks)
  • packages/project-builder-web/src/hooks/useStatus.ts (0 hunks)
  • packages/project-builder-web/src/pages/NotFound.page.tsx (1 hunks)
  • packages/project-builder-web/src/pages/apps/edit.page.tsx (2 hunks)
  • packages/project-builder-web/src/pages/apps/edit/AdminAppForm.tsx (1 hunks)
  • packages/project-builder-web/src/pages/apps/edit/BackendAppForm.tsx (2 hunks)
  • packages/project-builder-web/src/pages/apps/edit/WebAppForm.tsx (2 hunks)
  • packages/project-builder-web/src/pages/apps/edit/admin/AdminEditSectionForm.tsx (2 hunks)
  • packages/project-builder-web/src/pages/apps/edit/admin/AdminGeneralForm.tsx (2 hunks)
  • packages/project-builder-web/src/pages/apps/edit/admin/AdminSectionsForm.tsx (3 hunks)
  • packages/project-builder-web/src/pages/apps/edit/admin/crud/AdminCrudEmbeddedForm.tsx (6 hunks)
  • packages/project-builder-web/src/pages/apps/edit/admin/crud/AdminCrudSectionForm.tsx (2 hunks)
  • packages/project-builder-web/src/pages/apps/edit/admin/crud/CrudFormFieldsForm.tsx (2 hunks)
  • packages/project-builder-web/src/pages/apps/edit/admin/crud/CrudTableColumnsForm.tsx (3 hunks)
  • packages/project-builder-web/src/pages/data/enums/edit/EnumEditLayout.tsx (1 hunks)
  • packages/project-builder-web/src/pages/data/enums/edit/edit.page.tsx (1 hunks)
  • packages/project-builder-web/src/pages/data/enums/edit/sections/EnumValuesSection.tsx (1 hunks)
  • packages/project-builder-web/src/pages/data/models/edit/[id]/_components/fields/ModelFieldsForm.tsx (1 hunks)
  • packages/project-builder-web/src/pages/data/models/edit/[id]/_components/service/ServiceEmbeddedRelationForm.tsx (1 hunks)
  • packages/project-builder-web/src/pages/data/models/edit/[id]/_layout.tsx (1 hunks)
  • packages/project-builder-web/src/pages/data/models/edit/[id]/graphql.page.tsx (1 hunks)
  • packages/project-builder-web/src/pages/data/models/edit/[id]/index.page.tsx (1 hunks)
  • packages/project-builder-web/src/pages/data/models/edit/[id]/service.page.tsx (1 hunks)
  • packages/project-builder-web/src/pages/features/auth/RoleEditorForm.tsx (2 hunks)
  • packages/project-builder-web/src/pages/features/auth/index.tsx (5 hunks)
  • packages/project-builder-web/src/pages/settings/project-settings.tsx (1 hunks)
  • packages/project-builder-web/src/services/error-formatter.ts (1 hunks)
  • packages/ui-components/src/styles/button.ts (1 hunks)
💤 Files with no reviewable changes (15)
  • packages/project-builder-web/package.json
  • packages/project-builder-web/src/components/FormError/index.tsx
  • packages/project-builder-web/src/components/FormLabel/index.tsx
  • packages/project-builder-web/src/components/Sidebar/index.tsx
  • packages/project-builder-web/src/components/AlertIcon/index.tsx
  • packages/project-builder-web/src/components/TextInput/index.tsx
  • packages/project-builder-web/src/components/Alert/index.tsx
  • packages/project-builder-web/src/hooks/useStatus.ts
  • packages/project-builder-web/src/components/Button/index.tsx
  • packages/project-builder-web/src/components/CheckedInput/index.tsx
  • packages/project-builder-web/src/components/CheckedArrayInput/index.tsx
  • packages/project-builder-web/src/components/Table/index.tsx
  • packages/project-builder-web/src/components/Modal/index.tsx
  • packages/project-builder-web/src/components/SelectInput/index.tsx
  • packages/project-builder-web/src/components/LinkButton/index.tsx
🧰 Additional context used
🧬 Code Definitions (1)
packages/project-builder-web/src/pages/apps/edit/admin/crud/AdminCrudEmbeddedForm.tsx (2)
packages/project-builder-lib/src/schema/apps/admin/sections/crud.ts (2) (2)
  • adminCrudEmbeddedFormSchema (101-113)
  • AdminCrudEmbeddedFormConfig (115-117)
packages/project-builder-web/src/services/error-formatter.ts (1) (1)
  • logAndFormatError (34-37)
🔇 Additional comments (81)
.changeset/smooth-ducks-crash.md (1)

1-6: Changeset looks good!

The changeset correctly specifies a patch version update for the project-builder-web package, which is appropriate for this type of refactoring change. The description clearly communicates the purpose of the changes.

packages/ui-components/src/styles/button.ts (1)

18-18: Good addition of destructiveLink variant

The new destructiveLink variant follows the same pattern as the existing link variant but with destructive styling, providing a consistent way to implement link-style buttons with warning/danger semantics.

packages/project-builder-web/src/pages/NotFound.page.tsx (1)

4-4: Import path standardization looks good

Changing from relative imports to using the '@src' alias helps maintain consistency across the codebase and makes imports more maintainable, especially when files are moved around.

packages/project-builder-web/src/pages/data/models/edit/[id]/_components/fields/ModelFieldsForm.tsx (1)

11-12: Import path standardization is appropriate

Changing the SortableList import from a relative path to the '@src/components' alias is consistent with the project-wide refactoring effort. This improves maintainability and makes imports more consistent throughout the codebase.

packages/project-builder-web/src/pages/apps/edit/AdminAppForm.tsx (1)

29-29: Styling update looks good.

The change from a background color to a top margin with border provides a cleaner visual separation between the navigation tabs and content area.

packages/project-builder-web/src/pages/data/models/edit/[id]/graphql.page.tsx (1)

7-7: Good import consolidation.

Converting from a direct import to a barrel import improves maintainability and is consistent with the project-wide import standardization effort.

packages/project-builder-web/src/pages/data/enums/edit/EnumEditLayout.tsx (1)

9-10: Import path standardization looks good.

Using the @src alias instead of relative imports provides better consistency across the project and makes the codebase more maintainable when files are reorganized.

packages/project-builder-web/src/components/NotFoundCard/NotFoundCard.tsx (1)

3-3: Great component migration to shared UI library.

Replacing the local Button component with the one from @halfdomelabs/ui-components aligns perfectly with the PR objective of standardizing UI components across the project.

packages/project-builder-web/src/pages/data/enums/edit/sections/EnumValuesSection.tsx (1)

16-16: Import path update looks good.

The import path change from relative to the @src alias aligns with the standardization effort across the codebase. This improves consistency and maintainability.

packages/project-builder-web/src/services/error-formatter.ts (1)

5-5: Import path standardization looks good.

The update from relative import to the @src alias is consistent with the project's refactoring direction, making imports more maintainable.

packages/project-builder-web/src/pages/data/models/edit/[id]/_layout.tsx (1)

8-8: Import path refactor is correct.

The change to use the @src alias instead of a relative path follows the standardization pattern throughout this PR. This makes the codebase more consistent.

packages/project-builder-web/src/pages/data/models/edit/[id]/_components/service/ServiceEmbeddedRelationForm.tsx (1)

19-19: Import path update is appropriate.

Moving from a relative path to the @src alias for the usePrevious hook maintains consistency with the other import standardization changes in this PR.

packages/project-builder-web/src/components/ErrorBoundary/ErrorBoundary.tsx (1)

11-11: Import path standardization is correct.

The update to use the @src alias for the logError import is consistent with the project's import standardization pattern throughout this PR.

packages/project-builder-web/src/app/ProjectSelectorGate/ProjectSelectorDialog.tsx (1)

12-14: Absolute Imports for Hooks and Error Logging Updated.
The changes update the import paths for both useProjects and logError to use the alias (@src). This improves consistency and maintainability across the project.

packages/project-builder-web/src/pages/data/enums/edit/edit.page.tsx (1)

7-7: Consolidated Component Imports.
Consolidating the imports for ErrorBoundary and FormActionBar into a single statement from @src/components simplifies the code and aligns with the broader refactoring effort.

packages/project-builder-web/src/app/ClientVersionProvider/ClientVersionProvider.test.tsx (1)

5-5: Re-activating the getVersionInfo Import.
Reintroducing the getVersionInfo import from @src/services/api ensures that version information is correctly fetched during tests. This change is essential for the test suite’s coverage of version handling.

packages/project-builder-web/src/pages/data/models/edit/[id]/index.page.tsx (1)

12-13: Refined Imports and Utility Registration.
The consolidation of ErrorBoundary and FormActionBar imports enhances clarity, and adding the registerEntityTypeUrl import supports the standardized registration of entity types. This refactor helps maintain consistency across pages and ensures proper functionality.

packages/project-builder-web/src/app/AppLayout/ProjectSyncModal.tsx (1)

16-17: Updated Absolute Imports for API Functions.
Switching the imports for startSync and formatError to use the absolute alias (@src) is a positive move for code organization. Make sure that these functions behave as intended after the update.

packages/project-builder-web/src/pages/apps/edit.page.tsx (3)

6-6: Good import update to use ErrorDisplay from UI components

The import change properly adds the ErrorDisplay component from the UI components library, aligning with the PR objective to replace deprecated components.


9-9: Clean import path refactoring

Using the alias @src for importing components is a good practice that improves code maintainability by avoiding relative paths.


100-102: Good implementation of ErrorDisplay component

The replacement of the previous Alert component with ErrorDisplay is a good improvement. The template string for the error message provides more specific information about the error type.

packages/project-builder-web/src/pages/data/models/edit/[id]/service.page.tsx (1)

10-10: Improved import structure for FormActionBar

Changing from a direct import to a named import from the components barrel file is a good practice that simplifies imports and improves maintainability.

packages/project-builder-web/src/pages/settings/project-settings.tsx (1)

15-15: Consistent import refactoring for FormActionBar

Updated import pattern aligns with the project-wide effort to standardize imports from component barrel files instead of direct paths.

packages/project-builder-web/src/app/App.tsx (1)

9-9: Well-organized import consolidation

Consolidating multiple imports from the same source into a single import statement is a good practice that reduces code verbosity and improves readability.

packages/project-builder-web/src/components/FormActionBar/FormActionBar.tsx (1)

14-14: Good refactoring to named export

Switching from default export to named export improves maintainability by enabling better IDE support, making refactoring easier, and ensuring consistent importing patterns across the codebase.

packages/project-builder-web/src/app/ProjectSelectorGate/ProjectSelectorGate.tsx (1)

6-8: Good import path improvements

The changes to use absolute imports with the @src alias instead of relative paths improves code maintainability and readability. Explicit import of logError properly documents the dependency.

packages/project-builder-web/src/pages/apps/edit/WebAppForm.tsx (2)

10-15: Good migration to new UI component library

Successfully replaced the deprecated components with the standardized @halfdomelabs/ui-components library imports, which should provide better consistency and maintainability.


54-97: Clean implementation of new form components

The form fields have been properly migrated from deprecated components to their new equivalents in the UI component library:

  • TextInput.LabelledControllerInputField.Controller
  • CheckedInput.LabelledControllerCheckboxField.Controller
  • CheckedArrayInput.LabelledControllerMultiComboboxField.Controller

All props have been maintained correctly, preserving the original functionality while using the new component architecture.

packages/project-builder-web/src/components/CollapsibleRow/CollapsibleRow.tsx (4)

3-3: Good migration to standardized UI library

Properly replaced custom LinkButton component with the standard Button component from the UI library.


15-15: Good refactoring to named export

Switching to a named export is consistent with the broader refactoring effort in the codebase and improves maintainability.


29-40: Appropriate Button configuration

The LinkButton has been properly replaced with Button using appropriate props (variant="link" and size="none") to maintain the same visual appearance and functionality.


46-58: Consistent Button replacement pattern

The replacement pattern is consistently applied to all instances of the LinkButton component, maintaining the original functionality while using the standardized UI components.

packages/project-builder-web/src/pages/features/auth/RoleEditorForm.tsx (3)

9-9: LGTM! Components updated correctly.

The import statement now correctly includes InputField from the @halfdomelabs/ui-components library as part of the larger refactoring effort.


33-38: LGTM! Component replaced properly.

The TextInput.LabelledController has been successfully replaced with InputField.Controller while maintaining the same props and functionality.


39-43: LGTM! Component replaced properly.

The TextInput.LabelledController for the "Comment" field has been successfully replaced with InputField.Controller while maintaining the same props and functionality.

packages/project-builder-web/src/pages/apps/edit/admin/AdminEditSectionForm.tsx (5)

17-23: LGTM! Component imports updated correctly.

The import statements have been updated to include all necessary components from the @halfdomelabs/ui-components library, aligning with the PR objective of replacing deprecated components.


147-155: LGTM! LinkButton replaced with Button component.

The LinkButton has been correctly replaced with Button using appropriate props (variant="link" and size="none") to maintain the same visual appearance and functionality.


157-157: LGTM! TextInput replaced with InputField.

The TextInput.LabelledController has been successfully replaced with InputField.Controller for the "Name" field.


164-164: LGTM! TextInput replaced with InputField.

The TextInput.LabelledController has been successfully replaced with InputField.Controller for the "Icon" field.


165-170: LGTM! SelectInput replaced with SelectField.

The SelectInput.LabelledController has been successfully replaced with SelectField.Controller for the "Type" field, including the necessary options prop.

packages/project-builder-web/src/pages/features/auth/index.tsx (5)

16-21: LGTM! Component imports updated correctly.

The import statements have been updated to include all necessary components from the @halfdomelabs/ui-components library, following the PR's refactoring objective.


135-167: LGTM! Alert component updated correctly.

The UiAlert component has been successfully replaced with the new Alert component from the UI library, using the appropriate subcomponents (Alert.Title and Alert.Description) to maintain the same structure and functionality.


170-203: LGTM! Alert component updated correctly.

The second instance of UiAlert component has been successfully replaced with the new Alert component, maintaining consistent structure with the previous alert.


205-210: LGTM! CheckedInput replaced with CheckboxField.

The CheckedInput.LabelledController has been correctly replaced with CheckboxField.Controller for the "Use Auth0?" checkbox, preserving all the original props.


235-239: LGTM! CheckedInput replaced with CheckboxField.

The CheckedInput.LabelledController has been correctly replaced with CheckboxField.Controller for the "Enable Password Auth?" checkbox.

packages/project-builder-web/src/pages/apps/edit/admin/crud/AdminCrudSectionForm.tsx (4)

6-6: LGTM! Component imports updated correctly.

The import statement has been updated to include CheckboxField and SelectField from the @halfdomelabs/ui-components library.


10-10: LGTM! Import path updated to use alias.

The import for EmbeddedListInput now correctly uses the @src/components alias, which is consistent with the project's import structure.


53-58: LGTM! SelectInput replaced with SelectField.

The SelectInput.LabelledController has been successfully replaced with SelectField.Controller for the "Model" field, including the necessary props.


59-63: LGTM! CheckedInput replaced with CheckboxField.

The CheckedInput.LabelledController has been correctly replaced with CheckboxField.Controller for the "Disable Create?" checkbox.

packages/project-builder-web/src/pages/apps/edit/admin/crud/CrudTableColumnsForm.tsx (5)

10-14: Import updates look good.

The changes replace deprecated components with their counterparts from the UI components library and update the import path for CollapsibleRow to use the alias.


44-49: Component replacement is properly implemented.

SelectInput.LabelledController has been correctly replaced with SelectField.Controller, maintaining all necessary props.


50-54: InputField properly replaces TextInput.

The change from TextInput.LabelledController to InputField.Controller maintains the same interface with the required props.


57-63: SelectField implementation looks good.

The SelectField.Controller replacement correctly preserves all the props from the original SelectInput component.


66-81: UI component replacements are consistently applied.

All form fields in the foreign type condition have been properly updated to use the new component library, maintaining functionality.

packages/project-builder-web/src/pages/apps/edit/admin/AdminGeneralForm.tsx (3)

13-17: Import structure has been improved.

The import statement now correctly pulls components from the UI components library, which aligns with the project's refactoring goals.


63-68: InputField replacement looks good.

TextInput.LabelledController has been properly replaced with InputField.Controller, maintaining all necessary props.


70-76: MultiComboboxField correctly replaces CheckedArrayInput.

The MultiComboboxField.Controller component is an appropriate replacement for CheckedArrayInput.LabelledController when dealing with multiple selectable options.

packages/project-builder-web/src/pages/apps/edit/BackendAppForm.tsx (3)

10-10: Import has been updated correctly.

The import statement now pulls components from the UI components library instead of the deprecated project components.


42-47: Text field replacements look good.

InputField.Controller properly replaces TextInput.LabelledController, maintaining the same interface and functionality.


48-82: Checkbox replacements are consistently applied.

All CheckedInput.LabelledController components have been systematically replaced with CheckboxField.Controller, maintaining the same props and functionality throughout the form.

packages/project-builder-web/src/pages/apps/edit/admin/crud/CrudFormFieldsForm.tsx (2)

10-14: Import statements have been properly updated.

The changes replace deprecated component imports with UI components library imports and update the CollapsibleRow import to use the alias.


66-76: Form field components have been properly replaced.

Both SelectField.Controller and InputField.Controller are correctly implemented as replacements for their deprecated counterparts, maintaining the same props and functionality.

packages/project-builder-web/src/pages/apps/edit/admin/AdminSectionsForm.tsx (3)

5-5: Great update to UI component imports.

The change from custom sidebar components to standardized UI components from @halfdomelabs/ui-components aligns with the PR's objective of replacing deprecated components.


7-7: Approve import path change.

Directly importing from 'react-router-dom' is cleaner than using a relative import.


29-67: Improved navigation structure with modern components.

The refactoring from a custom Sidebar to SidebarLayout and NavigationMenu provides:

  1. Better semantic structure with proper list elements
  2. Clear separation between sidebar and content
  3. More maintainable component hierarchy

This implementation correctly uses the new UI component library pattern while maintaining the same functionality.

packages/project-builder-web/src/app/ProjectDefinitionProvider/ProjectDefinitionProvider.tsx (1)

25-29: Good import path standardization.

Changing from relative imports (src/...) to alias imports (@src/...) improves consistency across the codebase. This makes imports more maintainable and prevents path confusion when files are moved.

packages/project-builder-web/src/components/EmbeddedListInput/EmbeddedListInput.tsx (6)

10-10: Good refactoring to standard UI components.

Updating imports to use @halfdomelabs/ui-components aligns with the PR's objective of replacing deprecated components with UI components.


40-40: Export style improvement.

Changed from default export to named export, which is better for tree-shaking and more explicit imports.


71-72: Updated button size prop to new format.

Changed from "small" to "sm" to match the new UI component library's size prop format.


92-93: Updated Alert component props.

Changed from type="info" to variant="default" to match the new UI component library's prop structure.


94-111: Properly replaced Modal with Dialog component.

Good refactoring that:

  1. Changes from isOpen to open prop
  2. Adds onOpenChange for better state management
  3. Updates component hierarchy to use Dialog.Content and Dialog.Header
  4. Maintains the same functionality with a more modern component structure

129-134: Improved form structure with FormItem components.

The update to use FormItem.Label and FormItem.Error provides a more consistent pattern for form elements and improves accessibility.

packages/project-builder-web/src/components/index.ts (1)

3-10: Good export structure modernization.

Switching to wildcard exports (export * from) is more maintainable and provides a cleaner index file. This change properly exports the components that were refactored as part of the UI component upgrade.

packages/project-builder-web/src/pages/apps/edit/admin/crud/AdminCrudEmbeddedForm.tsx (8)

4-26: Import refactoring looks good!

The refactoring of imports aligns well with the PR objective. Notable improvements include:

  • Adding zPluginWrapper for enhanced form schema validation
  • Switching to aliased imports (@src/components) instead of relative paths
  • Using the toast system from ui-components for error handling
  • Properly importing form-related hooks from react-hook-form

These changes make the code more maintainable and follow modern import practices.


41-49: Table component structure successfully updated

The Table component structure has been properly updated to match the new UI component library conventions:

  • Table.HeadTable.Header
  • Table.HeadRowTable.Row
  • Table.HeadCellTable.Head

This maintains the same visual structure while aligning with the new component API.


59-77: Button components properly replaced LinkButton

The LinkButton components have been successfully replaced with the Button component from the UI library, using the appropriate semantic variants:

  • variant="link" for edit actions
  • variant="destructiveLink" for remove actions

This change improves consistency with the rest of the application and provides better semantic meaning.


99-103: Schema enhancement with plugin support

Good addition of the zPluginWrapper to extend the form schema validation with plugin support. This allows for dynamic validation rules based on the current project configuration.


104-107: Form hook properly updated

The change from the previous form hook to useForm with zodResolver is well implemented. This provides better type safety and validation using Zod schemas.


117-128: Form accessibility improved with unique ID

Good use of useId() to generate a unique form ID that connects the form element with its submit button. This improves accessibility and follows React best practices.


130-147: Form field components properly updated

The form field components have been properly updated to use the new UI component library:

  • TextInput.LabelledControllerInputField.Controller
  • SelectInput.LabelledControllerSelectField.Controller
  • CheckedInput.LabelledControllerCheckboxField.Controller

These components provide better integration with react-hook-form and improved styling.


161-163: Submit button properly connected to form

Good implementation of the submit button with proper form connection using the form ID. This follows accessibility best practices by allowing the button to be placed anywhere while still being associated with the form.

@kingston kingston merged commit c5aa78e into main Mar 21, 2025
7 checks passed
@kingston kingston deleted the kingston/eng-585-upgrade-headlessuireact branch March 21, 2025 08:44
@github-actions github-actions bot mentioned this pull request Mar 21, 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