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

feat: Highlight search matches #366

Merged
merged 3 commits into from
Dec 2, 2024
Merged

Conversation

e-fisher
Copy link
Collaborator

@e-fisher e-fisher commented Nov 28, 2024

Description

Highlight matched values when searching requests. Thank @allansson for laying the groundwork and extracting reusable highlight component! 🙌 I've tweaked the colors a bit to make it easier to see the highlighted parts.

How to Test

Test search in recorder, generator, and validator - verify matches are highlighted.

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (npm run lint) and all checks pass.
  • I have run tests locally (npm test) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Screenshots (if appropriate):

screencapture 2024-11-28 at 12 17 29

screencapture 2024-11-28 at 12 17 19

Related PR(s)/Issue(s)

Resolves #322

@e-fisher e-fisher force-pushed the feat/higlight-search-matches branch from 84fe087 to b2aa347 Compare November 28, 2024 10:20
onUpdateGroup?: (group: GroupType) => void
}

export function WebLogView({
// Memo improves performance when filtering
export const WebLogView = memo(function WebLogView({
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added memo improves performance when filtering large recordings - avoid re-rendering on every keystroke, and allows debounce inside useFilterRequests to kick in.

@e-fisher e-fisher marked this pull request as ready for review November 28, 2024 10:27
@e-fisher e-fisher requested a review from a team as a code owner November 28, 2024 10:27
@e-fisher e-fisher requested review from cristianoventura and Llandy3d and removed request for a team November 28, 2024 10:27
Copy link
Collaborator

@cristianoventura cristianoventura left a comment

Choose a reason for hiding this comment

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

Awesome! 🙌

@Llandy3d
Copy link
Member

I was testing it out and noticed this match, is it supposed to match that first entry ? 🤔

image

@e-fisher
Copy link
Collaborator Author

I was testing it out and noticed this match, is it supposed to match that first entry ? 🤔

image

Yeah, that's the "fuzziness", perhaps we don't need it to be this loose in this context, I'll lower the threshold

Copy link
Member

@Llandy3d Llandy3d left a comment

Choose a reason for hiding this comment

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

🚀

@e-fisher e-fisher merged commit 7bb06aa into main Dec 2, 2024
2 checks passed
@e-fisher e-fisher deleted the feat/higlight-search-matches branch December 2, 2024 07:47
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.

Requests inspector: filtering requests should highlight the matched value
3 participants