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: improved survey search #29372

Merged
merged 2 commits into from
Feb 28, 2025
Merged

fix: improved survey search #29372

merged 2 commits into from
Feb 28, 2025

Conversation

lucasheriques
Copy link
Contributor

Problem

Fix survey search to match terms in parentheses. Added ignoreLocation: true to Fuse.js config to ensure search finds terms regardless of their position in survey names

Changes

before:\

CleanShot 2025-02-28 at 15 11 22@2x

after:

CleanShot 2025-02-28 at 15 10 26@2x

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

yes

How did you test this code?

verified locally

@lucasheriques lucasheriques requested a review from a team February 28, 2025 18:12
@lucasheriques lucasheriques self-assigned this Feb 28, 2025
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

Added ignoreLocation: true to the Fuse.js search configuration in surveysLogic to improve survey search functionality.

  • Modified search behavior in frontend/src/scenes/surveys/surveysLogic.tsx to match terms regardless of their position in survey names
  • Fixed issue where search terms in parentheses weren't being properly matched
  • Maintained existing search threshold of 0.3 for fuzzy matching
  • Kept the same search keys (key and name) for survey filtering

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

Copy link
Contributor

github-actions bot commented Feb 28, 2025

Size Change: 0 B

Total Size: 9.73 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 9.73 MB

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@lucasheriques lucasheriques merged commit 79bc54b into master Feb 28, 2025
99 checks passed
@lucasheriques lucasheriques deleted the fix/survey-search branch February 28, 2025 19:09
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