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

RecordPicker refactoring part 3: remove effects #10505

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

charlesBochet
Copy link
Member

@charlesBochet charlesBochet commented Feb 26, 2025

This PR is part 3 of RecordPicker refactoring.

It aims to remove all effects from:

  • (low level layer) SingleRecordPicker, MultipleRecordPicker
  • (higher level layer) RelationPicker, RelationToOneInput, RelationFromManyInput, ActivityTargetInput...

In this PR, I'm re-grouping Effects in ActivityTarget section and creating a hook that will be called on inlineCellOpen

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

This PR removes the RecordPickerDecorator as part of the RecordPicker refactoring, simplifying the component architecture by passing the componentInstanceId directly through props.

  • Removed packages/twenty-front/src/testing/decorators/RecordPickerDecorator.tsx file completely, eliminating the context provider wrapper
  • Updated SingleRecordPicker.stories.tsx to remove the RecordPickerDecorator from the decorators list
  • The SingleRecordPicker now receives componentInstanceId directly as a prop (line 38), making the context provider decorator unnecessary
  • This change represents a shift from context-based configuration to direct prop passing, likely reducing complexity

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

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.

1 participant