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

Upgrade relation picker #8795

Merged
merged 3 commits into from
Nov 28, 2024
Merged

Upgrade relation picker #8795

merged 3 commits into from
Nov 28, 2024

Conversation

thomtrp
Copy link
Contributor

@thomtrp thomtrp commented Nov 28, 2024

  • Rename all parts using the name "relation" to "record" when component is only selecting record
  • Remove the use of scope states in folder
  • Rename entities to records

This PR prepares the use of the record picker in workflows

@thomtrp thomtrp force-pushed the tt-refacto-relation-picker branch from d6e13ae to 29b0fce Compare November 28, 2024 14:54
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 undertakes a significant refactoring effort to standardize terminology and improve state management in the relation picker components, replacing 'relation/entity' with 'record' and moving from scoped states to component-level state management.

  • Replaces RelationPickerScope with RecordPickerComponentInstanceContext.Provider for more direct state management
  • Introduces new component states (recordPickerSearchFilterComponentState, recordPickerPreselectedIdComponentState) to replace scoped states
  • Renames SingleEntitySelect to SingleRecordSelect and related components for consistent terminology
  • Inconsistent naming remains in some files where 'relation' or 'entity' terms are still used (e.g., selectedEntities in RecordsForMultipleRecordSelect)
  • Potential issue with instanceId still using 'relation-picker' value in RecordPickerDecorator

60 file(s) reviewed, 37 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +9 to 10
// TODO: use this for all search queries, because we need selectedRecords and recordsToSelect each time we want to search
// Filtered entities to select are
Copy link
Contributor

Choose a reason for hiding this comment

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

style: comment still refers to 'entities' but should use 'records' terminology. Also line 10 appears to be an incomplete comment

@thomtrp thomtrp force-pushed the tt-refacto-relation-picker branch from 414b586 to dd73369 Compare November 28, 2024 16:06
@thomtrp thomtrp force-pushed the tt-refacto-relation-picker branch from dd73369 to 47002be Compare November 28, 2024 16:44
@thomtrp thomtrp force-pushed the tt-refacto-relation-picker branch from 47002be to 8baf160 Compare November 28, 2024 16:58
@thomtrp thomtrp merged commit 83223ee into main Nov 28, 2024
19 checks passed
@thomtrp thomtrp deleted the tt-refacto-relation-picker branch November 28, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants