Split from https://github.com/twentyhq/twenty/pull/4518
- Upgrades dependencies and applies automatic config migrations with the
command: `npx nx migrate nx` (see
https://nx.dev/nx-api/nx/documents/migrate)
- Fixes lint errors after upgrading `@typescript-eslint`
Note: it was not possible (for now) to migrate Nx to the latest stable
version (v18.2.1) because it upgrades Typescript to v5.4.3, which seems
to cause a bug on install when Yarn tries to apply its native patches.
Might be a bug on the Yarn side.
When writing to the normalized cache (record), it's crucial to use _refs
for relationships to avoid many problems. Essentially, we only deal with
level 0 and generate all fields to be comfortable with their defaults.
When writing in queries (which should be very rare, the only cases are
prefetch and the case of activities due to the nested query; I've
reduced this to a single file for activities
usePrepareFindManyActivitiesQuery 🙂), it's important to use queryFields
to avoid bugs. I've implemented them on the side of query generation and
record generation.
When doing an updateOne / createOne, etc., it's necessary to distinguish
between optimistic writing (which we actually want to do with _refs) and
the server response without refs. This allows for a clean write in the
optimistic cache without worrying about nesting (as the first point).
To simplify the whole activities part, write to the normalized cache
first. Then, base queries on it in an idempotent manner. This way,
there's no need to worry about the current page or action. The
normalized cache is up-to-date, so I update the queries. Same idea as
for optimisticEffects, actually.
Finally, I've triggered optimisticEffects rather than the manual update
of many queries.
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
* Replace Terms & Conditions with Sign Up Link on Sign In #4502
* terms replaced with signup link
* begin fix (incomplete / do not merge)
* Revert
* Introduce welcome page
* Update Twenty website
---------
Co-authored-by: Mamatha Yarramaneni <mamathayarramaneni@Mamathas-Macbook.local>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
* feat: add event rows to Show Page Calendar tab
Closes#4287
* refactor: use time as events group key instead of ISO string for easier sorting
* feat: implement data model changes
* refactor: improve sorting
* feat: find duplicate objects backend init
* refactor: move duplicate criteria to constants
* fix: correct constant usage after type change
* feat: skip query generation in case its not necessary
* feat: filter out existing duplicate
* feat: FE queries and hooks
* feat: show duplicates on FE
* refactor: should-skip-query moved to workspace utils
* refactor: naming improvements
* refactor: current record typings/parsing improvements
* refactor: throw error if existing record not found
* fix: domain -> domainName duplicate criteria
* refactor: fieldNames -> columnNames
* docs: add explanation to duplicate criteria collection
* feat: add person linkedinLinkUrl as duplicate criteria
* feat: throw early when bot id and data are empty
* refactor: trying to improve readability of filter criteria query
* refactor: naming improvements
* refactor: remove shouldSkipQuery
* feat: resolve empty array in case of empty filter
* feat: hide whole section in case of no duplicates
* feat: FE display list the same way as relations
* test: basic unit test coverage
* Refactor Record detail section front
* Use Create as input argument of findDuplicates
* Improve coverage
* Fix
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* feat: display record identifier field as first column in table
& forbid hiding and moving record identifier column
Closes#3303
* refactor: add availableTableColumnKeysSelectorScopeMap
* feat: show plus icon button for label identifier column and dropdown menu for other columns
* fix: use label identifier field value in RecordShowPage title
* refactor: remove availableColumnKeys selector
* refactor: review - compute label identifier logic in mapViewFieldsToColumnDefinitions + remove selectors
* fix: several fixes
* fix: fix board fields isVisible
* fix: fix board fields reordering
* fix: more board fields fixes
* fix: fix hiddenTableColumnsSelectorScopeMap
* perf: apply record optimistic effects with cache.modify on mutation
Closes#3509
* refactor: return early when created records do not match filter
* fix: fix id generation on record creation
* fix: comment filtering behavior on record creation
* Fixed typing error
* refactor: review - use ??
* refactor: review - add variables in readFieldValueToSort
* docs: review - add comments for variables.first in triggerUpdateRecordOptimisticEffect
* refactor: review - add intermediary variable for 'not' filter in useMultiObjectSearchMatchesSearchFilterAndToSelectQuery
* refactor: review - add filter utils
* fix: fix tests
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
* fix: fix Relation field optimistic effect on Record update
Related to #3099
* Fix lint
* Fix
* fix
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* Added sortFields function and used on active and disabled metadataFields
* Added a sortFieldMetadataItem and used parseDate instead of vanila Date
* Added tests for sortFieldMetadataItem (#3253)
* Applied sortFieldMetadataItem (#3253)