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

Refactor connected account module #6225

Merged
merged 13 commits into from
Jul 12, 2024
Merged

Conversation

bosiraphael
Copy link
Contributor

  • Refactor connected account module
  • Move blocklist into it's own module
  • Move contact-creation-manager into it's own module

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

  • Added BlocklistQueryHookModule to WorkspaceQueryHookModule (/packages/twenty-server/src/engine/api/graphql/workspace-query-runner/workspace-query-hook/workspace-query-hook.module.ts)
  • Updated import paths for BlocklistRepository and BlocklistWorkspaceEntity (/packages/twenty-server/src/engine/object-metadata-repository/metadata-to-repository.mapping.ts, /packages/twenty-server/src/engine/twenty-orm/twenty-orm.manager.ts)
  • Introduced BlocklistQueryHookModule with pre-query hooks (/packages/twenty-server/src/modules/blocklist/query-hooks/blocklist-query-hook.module.ts)
  • Moved blocklist-related files to the new blocklist module (/packages/twenty-server/src/modules/blocklist/)
  • Refactored ConnectedAccountQueryHookModule to remove blocklist-related imports (/packages/twenty-server/src/modules/connected-account/query-hooks/connected-account-query-hook.module.ts)

30 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

export class GoogleAPIRefreshAccessTokenService {
constructor(private readonly environmentService: EnvironmentService) {}

async refreshAccessToken(refreshToken: string): Promise<string> {
Copy link
Contributor

Choose a reason for hiding this comment

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

🪶 style: Consider adding error handling for the HTTP request to manage potential failures gracefully.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

(updates since last review)

  • Refactored FooterNote.tsx to improve import order and link styling (/packages/twenty-front/src/modules/auth/sign-in-up/components/FooterNote.tsx)
  • Updated SignInUpForm.tsx to reorder imports and make terms and privacy policy links clickable (/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx)
  • Removed probability field from GraphQL queries and mock data (/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useFindManyRecords.ts, /packages/twenty-front/src/modules/search/hooks/__mocks__/useFilteredSearchEntityQuery.ts, /packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockCompanies.ts)
  • Added new command to update address fields in views (/packages/twenty-server/src/database/commands/0-22-add-new-address-field-to-views-with-deprecated-address.command.ts)
  • Deprecated and renamed probability field in various server files (/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids.ts, /packages/twenty-server/src/modules/opportunity/standard-objects/opportunity.workspace-entity.ts)

22 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

Folder re-organization LGTM!

@charlesBochet charlesBochet merged commit 11da718 into main Jul 12, 2024
6 checks passed
@charlesBochet charlesBochet deleted the refactor-connected-account-module branch July 12, 2024 18:15
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

(updates since last review)

  • Refactored navigation logic to use getObjectSlug utility in multiple files for consistency (/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexBoardDataLoaderEffect.tsx, /packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderPlusButtonContent.tsx, /packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewObject.tsx, /packages/twenty-front/src/modules/views/view-picker/hooks/useGetAvailableFieldsForKanban.ts)
  • Excluded 'Link' field type in SettingsObjectFieldEdit.tsx and SettingsObjectNewFieldStep2.tsx (/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldEdit.tsx, /packages/twenty-front/src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep2.tsx)
  • Refactored 0-22-add-new-address-field-to-views-with-deprecated-address.command.ts to use WorkspaceStatusService (/packages/twenty-server/src/database/commands/0-22-add-new-address-field-to-views-with-deprecated-address.command.ts)
  • Introduced WorkspaceStatusService and WorkspaceStatusModule for managing workspace statuses (/packages/twenty-server/src/engine/workspace-manager/workspace-status/services/workspace-status.service.ts, /packages/twenty-server/src/engine/workspace-manager/workspace-status/workspace-manager.module.ts)
  • Added new GraphQL error handling utilities and hooks (/packages/twenty-server/src/engine/core-modules/graphql/hooks/use-graphql-error-handler.hook.ts, /packages/twenty-server/src/engine/core-modules/graphql/utils/generate-graphql-error-from-error.util.ts, /packages/twenty-server/src/engine/core-modules/graphql/utils/should-capture-exception.util.ts)

49 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants