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

✨ Field mapping updates #445

Merged
merged 1 commit into from
May 20, 2024
Merged

✨ Field mapping updates #445

merged 1 commit into from
May 20, 2024

Conversation

naelob
Copy link
Contributor

@naelob naelob commented May 20, 2024

No description provided.

Copy link

vercel bot commented May 20, 2024

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

Name Status Preview Comments Updated (UTC)
panora-client-ts ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2024 9:41pm

Copy link

changeset-bot bot commented May 20, 2024

⚠️ No Changeset found

Latest commit: 60f7927

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

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

coderabbitai bot commented May 20, 2024

Walkthrough

The recent updates across multiple files in the project mainly focus on enhancing the user interface and interaction within the configuration and field mapping components. Key changes include the integration of tooltips and popovers for better user guidance, the introduction of new forms for defining and mapping custom fields, and the removal of checkbox selection functionalities from various tables. Additionally, there are updates to URL configurations and state management improvements.

Changes

Files Change Summary
apps/client-ts/src/app/(Dashboard)/configuration/page.tsx Modified imports, added tooltips and popovers, and updated rendering logic for linked accounts and field mappings.
apps/client-ts/src/components/Configuration/FieldMappings/FieldMappingsTable.tsx Replaced import of columns with useColumns, added state management, and integrated dialogs for forms.
apps/client-ts/src/components/Configuration/FieldMappings/columns.tsx Changed export from columns to useColumns and added new imports for UI components.
apps/client-ts/src/components/Configuration/FieldMappings/defineForm.tsx Introduced DefineForm component for defining custom fields with validation.
apps/client-ts/src/components/Configuration/FieldMappings/mapForm.tsx Introduced MapForm component for mapping data with validation and submission functionality.
apps/client-ts/src/components/Configuration/LinkedUsers/columns.tsx Removed checkbox functionality for row selection.
apps/client-ts/src/components/Configuration/Webhooks/columns.tsx Updated padding and font weight for the Badge component in useColumns function.
apps/client-ts/src/components/Connection/columns.tsx Removed checkbox selection functionality from the columns array.
apps/client-ts/src/components/Events/columns.tsx Removed checkbox selection functionality from the columns array.
apps/client-ts/src/components/shared/data-table-faceted-filter.tsx Improved handling of empty or whitespace values in field.value.
apps/client-ts/src/components/shared/data-table-webhook-scopes.tsx Added state and functionality for "Select All" option in webhook scopes.
apps/client-ts/src/hooks/get/useProviderProperties.tsx Added trailing whitespace after Authorization header value assignment.
packages/api/src/@core/field-mapping/field-mapping.service.ts Updated URL fetching logic and removed unnecessary logging.
packages/shared/src/utils.ts Updated customPropertiesUrl to an absolute URL.

🐰✨
In the code, where logic flows,
New tooltips and popovers arose.
Forms to map and fields to define,
User interactions, now more fine.
Checkboxes gone, sleek and clean,
A better UI, a coder's dream.
Hopping through changes, swift and bright,
CodeRabbit brings these updates to light!
🌟💻


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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

Copy link
Contributor

@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

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 1ce71bd and 60f7927.
Files selected for processing (14)
  • apps/client-ts/src/app/(Dashboard)/configuration/page.tsx (5 hunks)
  • apps/client-ts/src/components/Configuration/FieldMappings/FieldMappingsTable.tsx (3 hunks)
  • apps/client-ts/src/components/Configuration/FieldMappings/columns.tsx (1 hunks)
  • apps/client-ts/src/components/Configuration/FieldMappings/defineForm.tsx (1 hunks)
  • apps/client-ts/src/components/Configuration/FieldMappings/mapForm.tsx (1 hunks)
  • apps/client-ts/src/components/Configuration/LinkedUsers/columns.tsx (1 hunks)
  • apps/client-ts/src/components/Configuration/Webhooks/columns.tsx (2 hunks)
  • apps/client-ts/src/components/Connection/columns.tsx (2 hunks)
  • apps/client-ts/src/components/Events/columns.tsx (1 hunks)
  • apps/client-ts/src/components/shared/data-table-faceted-filter.tsx (1 hunks)
  • apps/client-ts/src/components/shared/data-table-webhook-scopes.tsx (3 hunks)
  • apps/client-ts/src/hooks/get/useProviderProperties.tsx (1 hunks)
  • packages/api/src/@core/field-mapping/field-mapping.service.ts (1 hunks)
  • packages/shared/src/utils.ts (1 hunks)
Files skipped from review due to trivial changes (2)
  • apps/client-ts/src/components/Configuration/Webhooks/columns.tsx
  • apps/client-ts/src/hooks/get/useProviderProperties.tsx
Additional comments not posted (12)
apps/client-ts/src/components/Configuration/LinkedUsers/columns.tsx (1)

Line range hint 1-18: LGTM! Removal of checkbox functionality aligns with the PR's objectives to simplify the UI.

apps/client-ts/src/components/Events/columns.tsx (1)

Line range hint 1-125: LGTM! Removal of checkbox functionality aligns with the PR's objectives to simplify the UI.

apps/client-ts/src/components/shared/data-table-faceted-filter.tsx (1)

27-30: Improved handling of empty or whitespace values in the filter. This change enhances the robustness of the filter functionality.

packages/api/src/@core/field-mapping/field-mapping.service.ts (1)

148-155: Updated the URL fetch logic to use a configurable URL, enhancing flexibility and maintainability. Good removal of hardcoded values.

apps/client-ts/src/components/Configuration/FieldMappings/FieldMappingsTable.tsx (1)

Line range hint 8-116: Integration of DefineForm and MapForm into the table component enhances the functionality for defining and mapping fields. The use of dialogs for these forms improves user interaction.

apps/client-ts/src/components/Configuration/FieldMappings/columns.tsx (1)

13-156: Refactored columns to useColumns with integrated state management for dialogs. This change enhances modularity and aligns with the PR's objectives to improve state management.

apps/client-ts/src/components/Connection/columns.tsx (1)

1-1: Confirmed removal of checkbox functionality for row selection.

apps/client-ts/src/components/shared/data-table-webhook-scopes.tsx (1)

Line range hint 27-66: Implemented "Select All" functionality for webhook scopes management effectively.

apps/client-ts/src/components/Configuration/FieldMappings/defineForm.tsx (1)

69-216: Successfully added DefineForm for defining custom fields with appropriate validation and state management.

apps/client-ts/src/app/(Dashboard)/configuration/page.tsx (1)

Line range hint 29-133: Integrated Tooltip, Popover, and HelpCircle components effectively to enhance user interaction on the configuration page.

Also applies to: 150-174

apps/client-ts/src/components/Configuration/FieldMappings/mapForm.tsx (1)

57-262: Successfully added MapForm for mapping custom fields with appropriate validation and state management.

packages/shared/src/utils.ts (1)

48-48: Updated customPropertiesUrl to an absolute URL for better reliability.

Verification successful

The customPropertiesUrl is correctly handled by axios.get in field-mapping.service.ts, and there are no assumptions about the URL being relative.

  • packages/api/src/@core/field-mapping/field-mapping.service.ts: The code correctly handles the absolute URL format for customPropertiesUrl.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that all functionalities depending on `customPropertiesUrl` handle the new URL format correctly.

# Test: Search for the usage of `customPropertiesUrl` in the codebase. Expect: Proper handling of the new URL format.
rg --type python $'customPropertiesUrl'

Length of output: 69



Script:

#!/bin/bash
# Description: Verify that all functionalities depending on `customPropertiesUrl` handle the new URL format correctly.

# Test: Search for the usage of `customPropertiesUrl` in the codebase. Expect: Proper handling of the new URL format.
rg --type ts 'customPropertiesUrl'

Length of output: 889



Script:

#!/bin/bash
# Description: Extract relevant code from `field-mapping.service.ts` to verify handling of `customPropertiesUrl`.

# Extract lines containing `customPropertiesUrl` and surrounding context for detailed analysis.
rg --context 5 'customPropertiesUrl' packages/api/src/@core/field-mapping/field-mapping.service.ts

Length of output: 668

@naelob naelob merged commit e09dd55 into main May 20, 2024
14 of 17 checks passed
@naelob naelob deleted the feat/fix-build branch July 27, 2024 18:26
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