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: Prevent Multiple Search Icons in Command Menu #10424

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

Conversation

Rithik-93
Copy link

@Rithik-93 Rithik-93 commented Feb 24, 2025

Description:
This PR fixes an issue where clicking the search button multiple times caused multiple search icons to appear in the search bar. The issue was caused by continuously appending new items to the navigation stack instead of replacing the existing search page entry.

Before:

searchBefore.mp4

After:

searchAfter.mp4

Copy link
Contributor

github-actions bot commented Feb 24, 2025

Welcome!

Hello there, congrats on your first PR! We're excited to have you contributing to this project.
By submitting your Pull Request, you acknowledge that you agree with the terms of our Contributor License Agreement.

Generated by 🚫 dangerJS against d92760e

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 modifies the command menu navigation stack logic to prevent duplicate search icons from appearing when clicking the search button multiple times.

  • Added navigation stack validation in packages/twenty-front/src/modules/command-menu/hooks/useCommandMenu.ts to check for existing pages before adding new ones
  • Implemented stack replacement logic when navigating to an existing page or when resetNavigationStack is true
  • Fixed visual bug where multiple search icons would stack in the command menu interface

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

1 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant