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

Fix search fallback action #10256

Merged
merged 2 commits into from
Feb 17, 2025
Merged

Fix search fallback action #10256

merged 2 commits into from
Feb 17, 2025

Conversation

bosiraphael
Copy link
Contributor

The command menu search bar was reset after clicking on the Search records fallback action, but it shouldn't.
This PR:

  • Introduces a new type of action: Fallback actions
  • Reset the search bar only if the action key differs from 'record-search-fallback'

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 introduces a new 'Fallback' action type to prevent the command menu search bar from resetting when using the 'Search records' fallback action, improving the search experience.

  • Added ActionMenuEntryType.Fallback in packages/twenty-front/src/modules/action-menu/types/ActionMenuEntry.ts for special case handling
  • Added SEARCH_RECORDS_FALLBACK key in RecordAgnosticActionsKey enum for distinct fallback action identification
  • Modified CommandMenuContainer to prevent search bar clearing and menu closing specifically for fallback search actions
  • Added new searchRecordsFallback configuration in RecordAgnosticActionsConfig.ts with Fallback type
  • Removed automatic search state reset from useSearchRecordsRecordAgnosticAction hook

7 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

@bosiraphael bosiraphael enabled auto-merge (squash) February 17, 2025 14:17
@bosiraphael bosiraphael merged commit e6a484b into main Feb 17, 2025
47 checks passed
@bosiraphael bosiraphael deleted the r--fix-search-fallback-action branch February 17, 2025 14:24
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