twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
GNU Affero General Public License v3.0
15.02k stars 1.48k forks source link

Finish relation definition refactor #6026

Open lucasbordeau opened 1 week ago

lucasbordeau commented 1 week ago

Scope & Context

Frontend, everything related to relation manipulation.

Technical inputs

We implemented a relationDefinition computed field on metadata. We want to use only this field to implement a unique system for relations and remove confusion we easily get when manipulating relations with the current backend.

greptile-apps[bot] commented 1 week ago
  1. Update field-metadata.resolver.ts to ensure relationDefinition is computed and returned correctly.
  2. Modify field-metadata.service.ts to centralize logic for computing relationDefinition.
  3. Refactor SettingsObjectNewFieldStep2.tsx to use relationDefinition for all relation manipulations.
  4. Update useRelationField.ts to utilize relationDefinition for consistent relation handling.

References

Bonapara commented 6 days ago

Refactooo