Skip to content

Conversation

@alexcambose
Copy link
Contributor

@alexcambose alexcambose commented Sep 4, 2025

Summary

Changed the search behaviour for the price feeds card/search box to match the one in the search bar.

Rationale

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

@alexcambose alexcambose requested a review from a team as a code owner September 4, 2025 11:23
@vercel
Copy link

vercel bot commented Sep 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
component-library Ready Ready Preview Comment Sep 4, 2025 11:23am
insights Ready Ready Preview Comment Sep 4, 2025 11:23am
5 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
api-reference Skipped Skipped Sep 4, 2025 11:23am
developer-hub Skipped Skipped Sep 4, 2025 11:23am
entropy-explorer Skipped Skipped Sep 4, 2025 11:23am
proposals Skipped Skipped Sep 4, 2025 11:23am
staking Skipped Skipped Sep 4, 2025 11:23am

@alexcambose alexcambose requested review from cprussin, felix-asym and fhqvst and removed request for felix-asym September 4, 2025 11:24
Comment on lines +95 to +97
return matchSorter(items, search, {
keys: ["displaySymbol", "symbol", "description", "key"],
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any chance this call would be blocking? Perhaps the array is small enough that this isn't a problem

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's a few thousands items so I don't think it's going to impact too much

predicate: (item: T, term: string) => boolean,
predicate: (item: T, search: string) => boolean,
doSort: (a: T, b: T, descriptor: SortDescriptor) => number,
doMutate: (items: T[], search: string) => T[],
Copy link
Contributor

Choose a reason for hiding this comment

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

Could probably have deleted predicate and doSort at this point since doMutate is a more open/powerful API anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's fair and I think at some point we can remove that. I didn't want to do a big refactor this time as it's used in a few places.

@alexcambose alexcambose merged commit faad438 into main Sep 4, 2025
10 checks passed
@alexcambose alexcambose deleted the fix/price-feeds-search branch September 4, 2025 13:54
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.

3 participants