Skip to content

Conversation

@filiptronicek
Copy link
Member

@filiptronicek filiptronicek commented Dec 3, 2024

Description

Make it possible to search for repos that are 1 or 2 characters in length by removing the "please type at least 3 characters to search" limit.

Related Issue(s)

Fixes CLC-945
Builds on top of investigations done in #20413

How to test

  1. Log into the preview env
  2. Try searching for repos, it should already search with 1 character


const filteredRepos = useMemo(() => {
const repos = [suggestedQuery.data || [], searchQuery.data || [], flattenedConfigurations ?? []].flat();
const repos = [suggestedQuery.data || [], flattenedConfigurations ?? [], searchQuery.data || []].flat();
Copy link
Member Author

Choose a reason for hiding this comment

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

This is done to artificially boost the priority of imported repos vs SCM-provided results.

Every time I change this, I think about how much we need to get rid of it entirely and just let listSuggestedRepositories receive a search string, which will do all deduplication and ordering by itself.

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

Code LGTM, tested and works ✔️

@filiptronicek filiptronicek self-assigned this Dec 4, 2024
@roboquat roboquat merged commit 2ab00fa into main Dec 4, 2024
30 checks passed
@roboquat roboquat deleted the ft/shorter-search-limits branch December 4, 2024 15:30
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.

4 participants