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

TWNTY-6135 - Improve Data Importer Select Matching #6338

Merged
merged 6 commits into from
Aug 22, 2024
Merged

Conversation

gitstart-app[bot]
Copy link
Contributor

@gitstart-app gitstart-app bot commented Jul 19, 2024

Description:

  • we move all logic about the unmatchedOptions to a new component called UnmatchColumn, because as it will be a full line in the table, it was better to update where the component will be rendered
  • In the latest changes to keep the columns when we change the step to step 3 and go back to step 2, we added a fallback state initialComputedColumnsState that saves the columns and only reverts the updates when we go back to step 1 or close by clicking the X button

Refs:

#6135

It was necessary to add references and floating styles to the generic component to fix the bug when the last option was open and the dropdown was being hidden in the next row of the spreadsheet table. We fixed the same problem that occurs in the companies table as well

we used this approach mentioned on this documentation to be able to use the hook without calling it on each component, we are calling only once, on the shared component https://floating-ui.com/docs/useFloating#elements
before:

now:

### Demo: https://jam.dev/c/e0e0b921-7551-4a94-ac1c-8a50c53fdb0c

Fixes #6135

NOTES: the enter key are not working on main branch too

@gitstart-twenty gitstart-twenty marked this pull request as draft July 19, 2024 12:12
Copy link

@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 color property to SelectOption type in packages/twenty-front/src/modules/spreadsheet-import/types/index.ts
  • Introduced UnmatchColumn component in packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UnmatchColumn.tsx
  • Updated MatchColumnSelect.tsx to handle isSubmatchSelect prop and new styled components
  • Refactored TemplateColumn.tsx to remove unmatched options logic
  • Modified MatchColumnsStep.tsx to integrate UnmatchColumn and update navigation button text

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

@gitstart-twenty gitstart-twenty changed the title TWNTY-6135 - Improve Data Importer Select Matching Improve Data Importer Select Matching Jul 22, 2024
@lucasbordeau
Copy link
Contributor

@Bonapara Should we implement a back button on this page ?

@lucasbordeau lucasbordeau marked this pull request as ready for review July 30, 2024 15:53
Copy link

@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)

The PR enhances the data importer select matching functionality by introducing new components and refactoring existing ones to align with design specifications.

  • Introduced UnmatchColumn component in packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UnmatchColumn.tsx.
  • Updated MatchColumnsStep.tsx to integrate UnmatchColumn and improve column matching logic.
  • Refactored SelectHeaderStep.tsx to use new types and improve state management.
  • Modified packages/twenty-front/src/modules/spreadsheet-import/types/index.ts to rename and restructure types for clarity.
  • Added new utility functions and hooks to support the updated matching logic.

292 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings

@@ -53,7 +54,7 @@ export type MatchColumnsStepProps<T extends string> = {
rawData: ImportedRow[],
columns: Columns<T>,
) => void;
onBack: () => void;
onBack?: () => void;
Copy link

Choose a reason for hiding this comment

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

style: Ensure the onBack function is correctly implemented and does not introduce navigation issues.

Comment on lines 123 to 126
data,
headerValues,
onContinue,
onBack,
}: MatchColumnsStepProps<T>) => {
Copy link

Choose a reason for hiding this comment

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

logic: Consider memoizing the dataExample to avoid recalculating it on each render.

onBack={onBack}
onBack={
// TODO: implement
() => {}
Copy link

Choose a reason for hiding this comment

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

style: Implement the onBack function to ensure proper navigation.

@Bonapara
Copy link
Member

Thanks @gitstart-twenty for the PR:

Just a few feedbacks:

CleanShot 2024-07-31 at 09 23 17

The tags' background should be displayed in the dropdown (not just text)

CleanShot 2024-07-31 at 09 24 27

The dropdown chevron should be displayed at the right edge of the Select (Sorry my mistake)

CleanShot 2024-07-31 at 09 35 58

If possible to be included in this PR: there should be a 16px gap between the text and button on the first screen

CleanShot 2024-07-31 at 09 38 21

The field looks deactivated as the color is Gray, is there a reason why it's not primary?

I like the back button, great idea, thanks for introducing it!

@gitstart-twenty
Copy link
Contributor

Hello @Bonapara
The disabled state is caused by the fact that the field is already selected below, since we can't assign the same field in the right column to multiple fields in the left column, we didn't change this behavior.

@Bonapara, @lucas, could you help us to be able to see the unmatched items dropdown? A few days after pushing this PR we are not able to see it anymore, even in the main branch.
To be able to make the sub-selection dropdown appear, we simply imported a newly exported CSV and selected an item to correspond with a Selection type field and a secondary dropdown appeared, however when resolving conflicts in the branch we noticed that this no longer works even in the main branch, something changed the behavior of the Data importer or somehow this method we used is no longer valid, could you guide us on how we can make the dropdown show up? I'm referring to this blue dropdown at 00:14 on this video in the PR description.

@lucasbordeau
Copy link
Contributor

lucasbordeau commented Jul 31, 2024

@gitstart-twenty Hi, I've eventually refactored and fixed the problems due to merging with main.

Could you please proceed with the following things in mind :

  • The back button on step 2 has been deactivated while merging main, I let you fix it.
  • Use the example you have in SelectFieldInput, we would like to refactor this into a SelectInput component, that takes options and onOptionSelected, that could then be shared between SelectFieldInput and spreadsheet import.
  • It would be very helpful if you could refactor the SpreadsheetImportStepper component by breaking it down into one component per step while keeping only the switch in this component.

@FelixMalfait
Copy link
Member

Hey, should we take over this one or is this still in progress on your side? Thanks

@FelixMalfait FelixMalfait self-assigned this Aug 7, 2024
@gitstart-twenty
Copy link
Contributor

Hello @FelixMalfait , we are working on it, finishing the second point of this comment

@FelixMalfait
Copy link
Member

Great thank you @gitstart-twenty!

@FelixMalfait FelixMalfait changed the base branch from main to 0.23 August 9, 2024 11:51
@FelixMalfait FelixMalfait changed the base branch from 0.23 to main August 9, 2024 11:52
@FelixMalfait
Copy link
Member

Hey, I think there was an issue where changes from main were brought into #f2aa35c1a8906d660e0b1510e58b08a414afb459 ? Maybe a failed rebase?

@gitstart-twenty
Copy link
Contributor

gitstart-twenty commented Aug 9, 2024

Hey @FelixMalfait
this looks strange 🤔 , I'm going to perform a force push to see if this can be resolved, these conflicts does not exist locally

Copy link

github-actions bot commented Aug 9, 2024

Fails
🚫

node failed.

Log

�[31mError: �[39m SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
�[90m    at parseJSONFromBytes (node:internal/deps/undici/undici:5584:19)�[39m
�[90m    at successSteps (node:internal/deps/undici/undici:5555:27)�[39m
�[90m    at fullyReadBody (node:internal/deps/undici/undici:1665:9)�[39m
�[90m    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)�[39m
�[90m    at async specConsumeBody (node:internal/deps/undici/undici:5564:7)�[39m
danger-results://tmp/danger-results-97501826.json

Generated by 🚫 dangerJS against d16235a

@gitstart-twenty gitstart-twenty marked this pull request as draft August 9, 2024 12:31
@gitstart-twenty gitstart-twenty marked this pull request as ready for review August 9, 2024 13:04
Copy link

@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)

The PR enhances the data importer select matching functionality by introducing new components and refactoring existing ones to align with design specifications.

  • Introduced UnmatchColumn component in packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UnmatchColumn.tsx.
  • Updated MatchColumnsStep.tsx to integrate UnmatchColumn and improve column matching logic.
  • Refactored SelectHeaderStep.tsx to use new types and improve state management.
  • Modified packages/twenty-front/src/modules/spreadsheet-import/types/index.ts to rename and restructure types for clarity.
  • Added new utility functions and hooks to support the updated matching logic.

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

@lucasbordeau
Copy link
Contributor

@gitstart-twenty We should keep our matching if we go back from last step to second step, right now we're losing everything. The best way would be to use a recoil state to store the mapping, and reset it when we are on first step ?

@lucasbordeau
Copy link
Contributor

lucasbordeau commented Aug 16, 2024

I'll do a final code review once all the functional elements are completed.

@gitstart-twenty
Copy link
Contributor

Hello @lucasbordeau, thank you for the reiew, we are working on it

@gitstart-app gitstart-app bot changed the title Improve Data Importer Select Matching TWNTY-6135 - Improve Data Importer Select Matching Aug 22, 2024
setPreviousStepState: (currentStepState: SpreadsheetImportStep) => void;
currentStepState: SpreadsheetImportStep;
nextStep: () => void;
errorToast: (message: string) => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

onError

default: [] as Columns<string>,
});

export const initialComputedColumnsState = selectorFamily<
Copy link
Contributor

Choose a reason for hiding this comment

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

initialComputedColumnsSelector

setCurrentStepState,
nextStep,
setPreviousStepState,
errorToast,
Copy link
Contributor

Choose a reason for hiding this comment

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

onError

}: SelectHeaderStepProps) => {
const [selectedRowIndexes, setSelectedRowIndexes] = useState<
ReadonlySet<number>
>(new Set([0]));

const [isLoading, setIsLoading] = useState(false);

const { selectHeaderStepHook } = useSpreadsheetImportInternal();

const onContinue = useCallback(
Copy link
Contributor

Choose a reason for hiding this comment

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

handleContinue

on is for events in props
handle is for handler in component

onBack: () => void;
setCurrentStepState: (data: SpreadsheetImportStep) => void;
errorToast: (message: string) => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

onError


const { enqueueSnackBar } = useSnackBar();

const errorToast = useCallback(
Copy link
Contributor

Choose a reason for hiding this comment

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

handleError

[enqueueSnackBar],
);

const onBack = useCallback(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

handleBack

onContinue: (data: WorkBook, file: File) => Promise<void>;
setUploadedFile: (file: File) => void;
setCurrentStepState: (data: any) => void;
errorToast: (message: string) => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

onError


const setHotkeyScope = useSetHotkeyScope();

useEffect(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please implement a solution that manages this scope outside of the UI folder, Field is out of the domain of UI components

Copy link
Contributor

@lucasbordeau lucasbordeau left a comment

Choose a reason for hiding this comment

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

Left some minor comments, please could you fix these in another PR post merge ?

@lucasbordeau lucasbordeau merged commit 9898ca3 into main Aug 22, 2024
11 of 13 checks passed
@lucasbordeau lucasbordeau deleted the TWNTY-6135 branch August 22, 2024 15:42
@lucasbordeau
Copy link
Contributor

@gitstart-twenty Well done !

lucasbordeau pushed a commit that referenced this pull request Aug 28, 2024
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-6135-1](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6135-1).

 --- 
### Description
This [PR](#6338) was merged, but
the reviewr asked for some changes in another PR
#6338 (review)


### Refs
#6338

### Demo
<https://jam.dev/c/80336c7a-4536-4a58-b531-981bac81cb26>

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
JarWarren added a commit to funnelmink/crm that referenced this pull request Aug 30, 2024
* If an object is disabled, then the relationships to that object should be disabled (twentyhq#6690)

This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-5370](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-5370).
This ticket was imported from:
[TWNTY-5370](twentyhq#5370)

 --- 


### Description

- We updated the logic in
packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.service.ts
  
  Test cases:
1. Ensure that when an object is disabled, all related relationships are
also disabled.
         a. Example disable the people object
b. Check the company object and verify that the people field has been
disabled too
c. Check the opportunity object and check that the point of contact
field has been disabled too
2. Verify that when a previously disabled object is restored, the
relationships are also restored.
3. Ensure that previously disabled relationships remain disabled when
the object is disabled and later restored.
4. Verify that relationships of a disabled object are not visible in the
UI.
5. Ensure that relationships to a disabled object are marked as inactive
in the data models screen

 ### Refs

twentyhq#5370

  
### Demo
  

<https://www.loom.com/share/2b0a91f463ca4e02a6963f9a8796a0d9?sid=1e9c4fb8-8fb9-4c6c-b43a-c50f3776e1d3>

Fixes twentyhq#5370

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>

* Add logging on currentWorkspaceMember query (twentyhq#6706)

We are experiencing slow GetCurrentUser endpoint, this is helping us
troubleshoot

* [Fix] field does not appear directly after creation (twentyhq#6708)

* Remove performance logs (twentyhq#6709)

We have found the root cause of the issue:
- when using a datasource (including the cached ones), we are fetching
ObjectMetadataCollection from cache (700kB). Datasource usage is
happening any time we are using twentyORM, which is everywhere in the
jobs and in some resolvers (including the GetCurrentUser one). This is
leading to a high load on redis and leading to the performance issues we
are seeing.
- we actually don't need to fetch this objectMetadataCollection while
using a cached datasource, only when we instantiate a new one

* Fix webhook issue (twentyhq#6711)

Fix
[#web](https://github.com/orgs/twentyhq/projects/1/views/3?pane=issue&itemId=75329194)

This PR does 2 things:
- migrate webhooks to TwentyORM
- Fix inversion between objectNameSingular and operation in webhook
eventName. It is stored as {objectNameSingular}.{operation} and we were
querying {operation}.{objectNameSingular}

* Bump version to 0.23.2

* corrected targetableobject being undefined when clicked on create task in command menu (twentyhq#6635)

Issue twentyhq#6630

It seems this bug is caused by `targetableObjects` being assigned an
empty array, which then leads to an error due to it being undefined.
I've made some changes that should address the issue, but I would
appreciate any feedback or suggestions on alternative solutions.

Please let me know if there is a better approach to resolving this.

Thank you!








https://github.com/user-attachments/assets/d6409798-3320-49b3-834f-2b6888847ed8

* Trigger workflow run manually (twentyhq#6696)

Fix twentyhq#6669

- create a commun function `startWorkflowRun` that both create the run
object and the job for executing the workflow
- use it in both the `workflowEventJob` and the `runWorkflowVersion`
endpoint

Bonus:
- use filtering for exceptions instead of a util. It avoids doing a try
catch in all endpoint

* Check workflow version is valid before publishing (twentyhq#6702)

Fix twentyhq#6670

* Fix logging error in webhook system

* Make workspaceMemberId optional in JWT for workspaces that are not ACTIVE (twentyhq#6714)

WorkspaceMemberId is mandatory in the jwt token generated for a given
user on a given workspace.
However, when a user signs up, it does not have a workspaceMemberId yet.

* TWNTY-6135 - Improve Data Importer Select Matching (twentyhq#6338)

### Description:

- we move all logic about the unmatchedOptions to a new component called
UnmatchColumn, because as it will be a full line in the table, it was
better to update where the component will be rendered
- In the latest changes to keep the columns when we change the step to
step 3 and go back to step 2, we added a fallback state
initialComputedColumnsState that saves the columns and only reverts the
updates when we go back to step 1 or close by clicking the X button

### Refs: 

twentyhq#6135

```
It was necessary to add references and floating styles to the generic component to fix the bug when the last option was open and the dropdown was being hidden in the next row of the spreadsheet table. We fixed the same problem that occurs in the companies table as well
```

we used this approach mentioned on this documentation to be able to use
the hook without calling it on each component, we are calling only once,
on the shared component
<https://floating-ui.com/docs/useFloating#elements>\
before:


![](https://assets-service.gitstart.com/25493/2c994e0f-6548-4a9e-8b22-2c6eccb73b2e.png)

now:


![](https://assets-service.gitstart.com/25493/f56fd516-7e95-4616-b1ed-c9ea5195a8ae.png)###
Demo: <https://jam.dev/c/e0e0b921-7551-4a94-ac1c-8a50c53fdb0c>

Fixes twentyhq#6135

NOTES: the enter key are not working on main branch too

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>

* 6687 change messaging import cron job to run every minute (twentyhq#6704)

Closes twentyhq#6687

* Update workflow version struct (twentyhq#6716)

We want to avoid the nested structure of active pieces. Steps to execute
will now be separated from the trigger. It will be an array executed
sequentially.

For now a step can only be an action. But at some point it will also be
a branch or a loop

* Created a specific scroll wrapper context per scroll wrapper and made ScrollTop and ScrollLeft componentStates (twentyhq#6645)

@lucasbordeau @charlesBochet 

Issue twentyhq#4826 

Could u review this changes.

Let me know what do you think.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>

* 6686 Add try catch on every cron job, and send exception to exceptionHandler (twentyhq#6705)

Closes twentyhq#6686

---------

Co-authored-by: Charles Bochet <charles@twenty.com>

* Add isInactive to FieldMetadata decorator (twentyhq#6623)

This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-4145](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-4145).
This ticket was imported from:
[TWNTY-4145](twentyhq#4145)

 --- 
### Description
This PR introduces the @isInActive() decorator to the standard field
metadata. \
- This gives the ability to allow workspaces to be able to be created
with standard fields as inactive *Helps prevent polluting existing
workspaces
- A new standard field can be added to* eg company-workspace-entity.ts
and the @WorkspaceIsInActive() decorator can be added to create it in
deactivated mode
sync-metadata command: `yarn command:prod workspace:sync-metadata -f`

### Refs
twentyhq#4145 

### Demo

<https://www.loom.com/share/10c13e2614d749809cfe2d2d847e963e?sid=017bbfcf-53c6-4205-8ffc-8a09c416220a>\

<https://www.loom.com/share/6ab86bd36f344c999cb8dacdb82c7bb0?sid=13ac78a2-de44-4772-bb54-7b57975e7360>\

Fixes: twentyhq#4145

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Charles Bochet <charles@twenty.com>

* 6654 serverless functions add a deploy button disable deploy when autosave (twentyhq#6715)

- improvements on serverless function behavior (autosave performances,
deploy on execution only)
- add versioning to serverless functions
- add a publish endpoint to create a new version of a serverless
function
  - add deploy and reset to lastVersion button in the settings section:
<img width="736" alt="image"
src="https://github.com/user-attachments/assets/2001f8d2-07a4-4f79-84dd-ec74b6f301d3">

* chore: upgrade aws-sdk v2 to v3 (twentyhq#6643) (twentyhq#6693)

Fixes (twentyhq#6643)

- According to `aws-sdk` v3, each service is packaged as a separate
module, and the codebase uses all of the required AWS services
accordingly. Therefore, removing the direct dependency on `aws-sdk:v2`
to resolve the warning shown in (twentyhq#6643)

Co-authored-by: Charles Bochet <charles@twenty.com>

* Fix addition of new option in select field if there are no existing options (twentyhq#6718)

Fixes
[sentry](https://twenty-v7.sentry.io/issues/5745628875/?alert_rule_id=15135099&alert_type=issue&notification_uuid=95108411-b431-4abd-bdd6-687c96a7353e&project=4507072563183616&referrer=discord)

* [Fix] Prevent fields name conflicts with composite subfields names (twentyhq#6713)

At field creation we are checking the availability of the name by
comparing it to the other fields' names' on the object; but for
composite fields the fields' names' as indicated in the repository do
not exactly match the column names' on the tables (e.g "createdBy" field
is actually represented by columns createdByName, createdBySource etc.).

In this PR we prevent the conflict with the standard composite fields'
names.
There is still room for errors with the custom composite fields: for
example a custom composite field "address" of type address on a custom
object "listing" will introduce the columns addressAddressStreet1,
addressAddressStreet2 etc. while we won't prevent the user from later
creating a custom field named "addressAddressStreet1".
For now I decided not to tackle this as this seem extremely edgy + would
impact performance on creation of all fields while never actually useful
(I think).

* Fix sentry issue (twentyhq#6719)

https://twenty-v7.sentry.io/issues/5677123076/?environment=prod&project=4507072499810304&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=7d&stream_index=12

Removes billing section when is_free_access_enabled

* Added hotkeyScopes to serverless functions in settings (twentyhq#6710)

Fixes twentyhq#6656 
Is this the right way to implement keyboard listeners?
Please let me know, I'll make the changes accordingly.
:)


https://github.com/user-attachments/assets/af71d340-ead9-4659-81e6-a440522a194f

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>

* Fix serverless save when name empty (twentyhq#6720)

- fix serverless function error on save when name empty
- remove useless unique constraint on serverless function names

* Visualize Workflows (twentyhq#6697)

## Features

- Fetch a workflow and display it in a tree with the React Flow library
- The nodes are positioned by an algorithm
- The feature is put behind a feature flag. The `/workflow/:id` route is
disabled if the flag is off.
- I started implementing a right drawer. That's a big WIP and it will be
finished in another PR.

## How to test this feature

1. Create a workflow instance in the database through a GraphQL query.
See below for instructions.
2. After enabling the feature flag, you should be able to see the
workflow you created in the workflows list. To visualize the workflow,
go to the `/workflow/:id` page where the id is the id of the workflow.
See the video for a quick way to do so.

```gql
// First
mutation createWorkflow($data: WorkflowCreateInput!) {
  createWorkflow(data: $data) {
    id
  }
}

// Result
{
  "data": {
    "name": "test"
  }
}

// Second
mutation createWorkflowVersion($data: WorkflowVersionCreateInput!) {
  createWorkflowVersion (data: $data) {
    id
  }
}

// Result
{
  "data": {
    "name": "v1",
    "trigger": {
  "name": "trigger",
"displayName": "New or Updated Row",
"type": "DATABASE_EVENT",
"settings": {
"eventName": "company.created",
"triggerName": "Company Created"
},
  "nextAction": {
    "name": "step_1",
    "displayName": "Code",
    "type": "CODE",
    "valid": true,
    "settings": {
      "serverlessFunctionId": "function_id",
      "errorHandlingOptions": {
        "retryOnFailure": {
          "value": false
        },
        "continueOnFailure": {
          "value": false
        }
      }
    }
  }
},
"workflowId": "workflow_id"
  }
}
```


https://github.com/user-attachments/assets/42bbd98c-5e13-447c-9307-461a18ac2195

* Fix table re-renders on update field (twentyhq#6722)

The update of all fields was caused by `useContextSelector` not being
properly implemented.

As it is a memoization library the `useRecordFieldValue` hook wasn't
giving to the library the required things to allow memoization.

I just added recordId + fieldName to the memoization function so that
`useContextSelector` doesn't recompute itself whenever any record
changes.

* Fix currency field edition form (twentyhq#6723)

This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-6692](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6692).
This ticket was imported from:
[TWNTY-6692](twentyhq#6692)

 --- 


### Description

The problem is not related to the API, what was happening was a failure
in the form validation, because in the changed file, the `currencyCode`
value, which should be a string with single quotes around it, was
receiving single quotes again, unnecessarily, and this affected field
validation in
`packages/twenty-front/src/modules/object-record/record-field/validation-schemas/currencyFieldDefaultValueSchema.ts`

please, make this change below before testing the PR(to fix a bug, the
slice is not updated yet):\

<twentyhq@aa4ae53>

### Demo


<https://www.loom.com/share/2ce130f2e2fe46868e9b1e9119f65cde?sid=dbcb2da2-3641-423c-bdfc-01b0fc52162a>

### Refs

twentyhq#6692

Fixes twentyhq#6692

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>

* Fix twenty-front performances (twentyhq#6744)

I have investigated the performance of our frontend vite build:
`npx nx run twenty:start` of `npx nx run twenty:build`

RAM usage:
- 160Mb: vite serve
- background typescript checker: 2.5GB
- background eslint checker: 3.5GB

I'm introducing two environment variables in FE .env to disable these
checkers on lower configuration (and to disable them from CD build):
```
# VITE_DISABLE_TYPESCRIPT_CHECKER=true
# VITE_DISABLE_ESLINT_CHECKER=true
```

* Increase front build max memory usage for sourcemaps build

* [Fix] Move save button to top on field edit (twentyhq#6739)

Before
<img width="802" alt="image"
src="https://github.com/user-attachments/assets/2a9d9501-6bd4-4dc2-b8d7-98a29816caab">

After
<img width="871" alt="Capture d’écran 2024-08-26 à 12 17 29"
src="https://github.com/user-attachments/assets/b6cb688c-fdcd-4b10-8d91-197245f7dd56">

* E2E tests (twentyhq#6717)

Continuation of twentyhq#6644 

Now chromium browser is used in workspaces tests instead of firefox and
screenshots after each test are properly saved in one folder when run
from IDE and from terminal using `yarn test:e2e` command

* View becomes blank after deleting select (twentyhq#6703)

This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-6027](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6027).
This ticket was imported from:
[TWNTY-6027](twentyhq#6027)

 --- 

### Description

- Delete corresponding view simultaneously once select field is
deactivated instead of deleted because the bug happens on the
deactivation (one step before deleting), confirmation:
<https://discord.com/channels/1130383047699738754/1268662542172028971/1270367244509249651>
- Is still possible to create Kanban views with deactivated Select
fields, but this is not related to the PR.
- The changes on the frontend are for refreshing the data after the view
deletion

### Refs

twentyhq#6027

### Demo


<https://www.loom.com/share/4f705344e3054cd5b3d5eadd398d2c9c?sid=8db3d8b9-4dce-4e31-8359-0e31cbc0e2e7>

Fixes twentyhq#6027

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>

* Added sync status on the FE (twentyhq#6730)

Issue twentyhq#6685 

How do we make sure we get the latest syncStatus on the frontend?
For now we dont get it unless refreshed.
useInterval() on fetching account details?

* Increase front build max memory usage for sourcemaps build

* Fix Website build CD (twentyhq#6751)

Website CD has been broken by the recent addition of typeorm patch in
root package.json

Our current vision is to add npm package to each twenty-package
package.json directly

* [POC] add graphql query runner (twentyhq#6747)

## Context
The goal is to replace pg_graphql with our own ORM wrapper (TwentyORM).
This PR tries to add some parsing logic to convert graphql requests to
send to the ORM to replace pg_graphql implementation.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>

* Fix twenty-front build (twentyhq#6752)

* 6256 refactor messaging module to remove all provider specific code and put it inside the drivers folders (twentyhq#6721)

Closes twentyhq#6256 
Closes twentyhq#6257 
+ Create custom exceptions

---------

Co-authored-by: Charles Bochet <charles@twenty.com>

* Add function execution throttler (twentyhq#6742)

Add throttler service to limit the number of function execution

* Improve record table scroll look (twentyhq#6753)

We had a regression on the record table as our inView hook was not able
to find the right div to compute its margin. This is because we are
identify this div by a hacky css selector as we don't have a direct
control on it (it's provided by our scrolling library)

* 6655 remove field direction in message and add it in mcma (twentyhq#6743)

Closes twentyhq#6655 
- Remove direction from message
- Add direction do mcma
- Create migration command
- Create upgrade 0.24

* 5617 Create CalendarOngoingStaleCron Job (twentyhq#6748)

Closes twentyhq#5617

---------

Co-authored-by: Charles Bochet <charles@twenty.com>

* Fix post merge conflicts on messaging services

* Fix post merge conflicts on messaging services

* Fix message direction seeds (twentyhq#6760)

Direction is now on mcma and no longer on message

* Add workflow statuses (twentyhq#6765)

Following figma updates
https://www.figma.com/design/PNBfTgOVraw557OXChYagk/Explo?node-id=21872-7929&t=DOUzd6rzwr6lprcs-0

- No activity targets for workflow entities for now
- Adding a direct relation between workflow run et workflow
- Adding a status on the version (draft, active, deactivated)
- Adding a list of statuses on workflow 
- publishedVersionId => lastPublishedVersionId

Also adding:
- the endpoint to deactivate a version

* Added "Add record" button in kanban view column headers dropdown (twentyhq#6649)

Closes twentyhq#4629 
Refactored `RecordBoardColumnNewOpportunityButton` and
`RecordBoardColumnNewButton` to use the same logic in dropdown.

I kept those hooks inside `record-board-column` where these buttons are.
Let me know if it should be placed somewhere else.

Also Added navigation state preservation when clicked on `edit from
settings`

Thanks :)

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>

* Fix participant listeners (twentyhq#6767)

Fixes a bug where all the messagesParticipants and the
calendarEventParticipants were linked to a contact after its
restoration.

* added "reply in gmail" button (twentyhq#6754)

Issue twentyhq#4217

* fix: defaultHomePagePath to be last visited page or alphatically first active object with the name (twentyhq#6629)

### ISSUE 

- Closes twentyhq#6612
- Closes twentyhq#6125
- Closes twentyhq#5949
- Closes twentyhq#6652 

### Description 

- [x] need to check changes in jest test.
- [x] fallback to alphabetically firstActiveObject with the name if no
last visited exist


https://github.com/user-attachments/assets/dd11480b-c47f-4393-9857-8a55467061e3

- [x] fallback to last visited page with the last visited view by
default if no views would have toggled with subNav or viewChangeDropdown
it will fallback to INDEX or if no INDEX view then zero position view,
works with both subNavViewBar and viewChangeDropdown.



https://github.com/user-attachments/assets/33e97e55-2aa2-4c45-a3ab-fc8e43f4964c



https://github.com/user-attachments/assets/d1db76a2-da59-4cd2-81bf-d6119408fbbf

- [x] lastVisited view across the objects have been persisted so now
navigating back from x object to y or z to x will open always last
visited view and defaults to index or zero position view.



https://github.com/user-attachments/assets/70a01a11-a7ef-4031-926e-02923551466c

- [x] lastVisited Page with view has been persisted across the
workspace, scope is per workspace so jumping between workspace will also
work to have lastvisited object of particular workspace.



https://github.com/user-attachments/assets/25107339-8ec1-4421-9f6e-1da43b8f4816

- [x] when lastVisitedObject has been deactivated and going back from
settings should have a fallback Object that is alphabetically First
activeObject.



https://github.com/user-attachments/assets/6b24a933-b139-49ac-82b2-eac5e4848516


- [x] Creation of new View of **anyType** should also get persist and
that should get lastVisitedObject with View in case the user leaves from
there right away.



https://github.com/user-attachments/assets/80ff7114-051d-4e9b-ab58-0e1e3a7d328c

- [x] Similarly deleted view also works. 


https://github.com/user-attachments/assets/cb0b8043-fba4-4a66-941d-b3fa0a57eb22


- [x] fixed active subnav background when opening object directly with
root path **/** , it wasn't showing active subNav background.

Before: 


https://github.com/user-attachments/assets/db341c4a-f1f9-43c4-9838-37d1a1f5ab8e

Fixed: 


https://github.com/user-attachments/assets/0f0fd492-bc5d-4efe-b695-bee4e3f41d4e

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>

* Removed drag grip and accent is now tertiary in hidden fields (twentyhq#6650)

Closes twentyhq#6115

This change successfully addresses the issue as described. However, it
also causes the primary non-draggable field, `Name`, to render without a
draggable handle and with a secondary accent. Is this an acceptable
outcome?



https://github.com/user-attachments/assets/4bc15e00-6c73-41d4-8342-4e36487d0981

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>

* Improve Data Importer Select Matching - Post Merge Updates (twentyhq#6750)

This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-6135-1](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6135-1).

 --- 
### Description
This [PR](twentyhq#6338) was merged, but
the reviewr asked for some changes in another PR
twentyhq#6338 (review)


### Refs
twentyhq#6338

### Demo
<https://jam.dev/c/80336c7a-4536-4a58-b531-981bac81cb26>

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>

* refactor graphql query runner connection mapper (twentyhq#6771)

* Add composite Emails field and forbid creation of Email field type (twentyhq#6689)

### Description

1. 
   - We are introducing new field type(Emails)


   - We are Forbiding creation of Email field


   - We Added support for filtering and sorting on Emails field


- We are using the same display mode as used on the Links field type
(chips), check the Domain field of the Company object


   - We are also using the same logic of the link when editing the field

   \
   How To Test\
   Follow the below steps for testing locally:\
   1. Checkout to TWENTY-6261\
2. Reset database using "npx nx database:reset twenty-server" command\
   3. Run both the backend and frontend app\
4. Go to Settings/Data model and choose one of the standard objects like
people\
   5. Click on Add Field button and choose Emails as the field type

   \
   ### Refs

   twentyhq#6261\
   \
   ### Demo

    \

<https://www.loom.com/share/22979acac8134ed390fef93cc56fe07c?sid=adafba94-840d-4f01-872c-dc9ec256d987>

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>

* fix: relation and record chip height (twentyhq#6758)

# ISSUE 
- Closes twentyhq#6756 

After Changes: 


https://github.com/user-attachments/assets/1885be11-b50a-4b05-afae-d2f02a403ad6



https://github.com/user-attachments/assets/edc6a913-95a6-4c75-8ec2-83e2c27fddb0

* fix/6759: reduce icon size in note grip menu to 16px and adjust conta… (twentyhq#6780)

### Summary

This pull request addresses issue twentyhq#6759 by adjusting the icon size and
container padding in the note grip menu. The 6-dot icon's size has been
reduced from 20px to 16px, while the container size has been kept at
20px to maintain the proper alignment and spacing.

### Changes Made
- **Icon Size**: Reduced the SVG icon size to 16x16px.
- **Container Size**: Ensured the container remains 20x20px to
accommodate the icon and maintain visual consistency.

### Screenshots
<img width="1440" alt="Screenshot 2024-08-29 at 3 26 41 AM"
src="https://github.com/user-attachments/assets/d8618636-165a-440d-a41e-947b2aa00bdb">


### Related Issue
- [Issue twentyhq#6759]

### Testing
- Verified that the icon and container sizes are correctly displayed in
the note grip menu.
- Ensured no other UI elements were affected by these changes.

Please review the changes and let me know if any additional
modifications are required. Thank you!

Co-authored-by: Rishi Kant <khairrishi@Rishis-MacBook-Air.local>

* Added ability to search objects and fields (twentyhq#6775)

Closes twentyhq#6770 



https://github.com/user-attachments/assets/e3134389-30d2-48c8-bbca-34209d5ae66d

* chore(*): remove unused code (twentyhq#6781)

The code removed in the PR was flagged as unused by the JetBrains
inspector.

I did a QA on the dev environment but other checks are highly
recommended.

There is one commit by scope to make the review easier.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>

* Fixed record table fetch more scroll bug (twentyhq#6790)

Fetch more on the record table was causing a strange bug where it was
auto scrolling to the bottom of the newly loaded chunk of rows.

This was confusing because we lost our previous position in the record
table.

With this fix the table doesn't scroll when more rows are loaded.

The fetch more row has been moved in the same tbody as the rest of the
rows.

We now only hide it when there is no more record to fetch.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>

* 0.24 changelog (twentyhq#6787)

* Bump version to 0.24 (twentyhq#6789)

As title

* Update wording on soft deletes

* repair yarn.lock

---------

Co-authored-by: gitstart-app[bot] <57568882+gitstart-app[bot]@users.noreply.github.com>
Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
Co-authored-by: Marie <51697796+ijreilly@users.noreply.github.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: nitin <142569587+ehconitin@users.noreply.github.com>
Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com>
Co-authored-by: martmull <martmull@hotmail.fr>
Co-authored-by: Naineel Soyantar <112230479+naineel1209@users.noreply.github.com>
Co-authored-by: Baptiste Devessier <baptiste@devessier.fr>
Co-authored-by: BOHEUS <56270748+BOHEUS@users.noreply.github.com>
Co-authored-by: Weiko <corentin@twenty.com>
Co-authored-by: Nabhag Motivaras <65061890+Nabhag8848@users.noreply.github.com>
Co-authored-by: Rishi Kant <110294979+kant-github@users.noreply.github.com>
Co-authored-by: Rishi Kant <khairrishi@Rishis-MacBook-Air.local>
Co-authored-by: Antoine Moreaux <antoine@specifyapp.com>
Co-authored-by: Thomas des Francs <tdesfrancs@gmail.com>
This pull request was closed.
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.

Improve Data Importer Select Matching
4 participants