Skip to content

Conversation

thomtrp
Copy link
Contributor

@thomtrp thomtrp commented Jun 6, 2025

First PR to add filters to send records. Lot of work left, but I want to split. I mainly want to validate the architecture there.

Enregistrement.de.l.ecran.2025-06-06.a.11.09.08.mov

TODO in next PRs:

  • fix design
  • make filters reliable. Some composite fields are not implemented and some fields like datetime do not work well
  • improve typing

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

Implements filtering capabilities for the Search Records workflow action with advanced filter UI and state management across front and backend.

  • Added new AdvancedFilterValueFormInput and AdvancedFilterValueFormCompositeFieldInput components to handle specialized form inputs like ADDRESS and CURRENCY fields in filters
  • Integrated new AdvancedFilterContext for centralized filter updates, with proper hooks integration in useRemoveRecordFilter, useUpsertRecordFilter, and related hooks
  • Extended workflow schema and backend types to support complex filter structures including recordFilterGroups, recordFilters, and gqlOperationFilter
  • Created WorkflowFindRecordFilters and WorkflowFindRecordFiltersEffect components to manage nested filter groups and filter initialization in workflows
  • Modified FindRecordsWorkflowAction backend class to handle the new filter structure through gqlOperationFilter property

20 file(s) reviewed, 17 comment(s)
Edit PR Review Bot Settings | Greptile

@thomtrp thomtrp force-pushed the tt-filters-in-search-record-action branch from d1f0df6 to b7db9b8 Compare June 6, 2025 08:35
Copy link
Contributor

github-actions bot commented Jun 6, 2025

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:25850

This environment will automatically shut down when the PR is closed or after 5 hours.

@thomtrp thomtrp force-pushed the tt-filters-in-search-record-action branch from b7db9b8 to 087de62 Compare June 6, 2025 09:03
@thomtrp thomtrp assigned lucasbordeau and unassigned lucasbordeau Jun 6, 2025
label: 'Search Records',
type: 'FIND_RECORDS',
icon: 'IconSearch',
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

will hide this again once reviews are done

Copy link
Contributor

@martmull martmull left a comment

Choose a reason for hiding this comment

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

Functional remarks

  • all composite fields does not behave the same, currency and address does not work like LINK or ACTOR fields:
image image - we might need some server updates to take filters into account isn't it? Probably for another PR


const filterType = recordFilter.type;

return (
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like it does not work well tbh, i personally prefer the regular way to display composite fields (see general comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep design is not done for now. design should match regular way but in column. Will be for another PR

@thomtrp thomtrp enabled auto-merge (squash) June 6, 2025 12:23
@thomtrp thomtrp merged commit 0188b66 into main Jun 6, 2025
52 checks passed
@thomtrp thomtrp deleted the tt-filters-in-search-record-action branch June 6, 2025 12:29
abdulrahmancodes pushed a commit to abdulrahmancodes/twenty that referenced this pull request Jun 10, 2025
First PR to add filters to send records. Lot of work left, but I want to
split. I mainly want to validate the architecture there.

https://github.com/user-attachments/assets/63375a75-ba88-49df-8c12-5e3e58de5342

TODO in next PRs:
- fix design
- make filters reliable. Some composite fields are not implemented and
some fields like datetime do not work well
- improve typing
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.

3 participants