Closed Mandeep56Singh closed 2 months ago
Thanks for the issue, our team will look into it as soon as possible! If you would like to work on this issue, please wait for us to decide if it's ready. The issue will be ready to work on once we remove the "needs triage" label.
To claim an issue that does not have the "needs triage" label, please leave a comment that says ".take". If you have any questions, please comment on this issue.
For full info on how to contribute, please check out our contributors guide.
.take
The issue you are trying to assign yourself is blocked until it can be triaged or by another label on the issue.
@adamgonzo have you checked in your system ? do you get the same issue ?
@Mandeep56Singh yes i get the same issue
@adamgonzo I find it kinda weird that search suggest any repo in search repositories field, I should only suggest repos based on seleted topic. Like I seleted typescript then It should only suggest repos based on it. Otherwise there is no use of it. We also have search field at top which can also be used for the searching any kind of repo
@Mandeep56Singh from what i understand you are saying that once you select a topic the search should only present repositories within that topic ?
@adamgonzo yeah, because repositories are shown based on selected topic and we are using search filed so to find the repo under that topic fast.
Thanks @Mandeep56Singh @adamgonzo. The URL path should begin with /explore/topic/{topic}/...
instead of /{topic}/...
.
.take
hey I was also intrested in solving this issue too 😅 but no worries
@brandonroberts @adamgonzo I have resolved this issue
https://github.com/user-attachments/assets/3951bcc8-0012-4071-a00c-47bbb68da203
should I create a pr ?
@Mandeep56Singh if @adamgonzo wants to defer to you, that's fine. They did try to pick it up initially
@brandonroberts thats totally fine I won't be able to get till it till 5 pm anyways and it's an issue that is affecting users so it's okay with me
Issue persist when you also press enter with blank field
@adamgonzo also happen when clicking cross icon.
@brandonroberts It seems that in handleOnSearch within repositories.tsx, the following code is responsible for the issue:
const handleOnSearch = (search?: string) => {
if (selectedFilter && !search) {
return router.push(`${topic}/${toolName}`);
}
if (search && /^[a-zA-Z0-9\-\.]+\/[a-zA-Z0-9\-\.]+$/.test(search)) {
return router.push(`/explore/topic/${topic}/${toolName}/filter/${search}`);
}
};
The first if condition is causing the problem when the search query is empty, directing the user to a weird page. This could be fixed by updating the route as we did in the second condition. But then when user enter the empty query the page direct to current page and all filter get cleared. My question is when search field is empty why we need to use router , there is no need for first if ?
@Mandeep56Singh yes, the path in the first condition should match. We support that way also so you can clear the search box after filtering for a specific repository
@brandonroberts It is also affecting the clear button. When a user selects a filter and unintentionally inputs the wrong text, clicking the 'clear' button currently clears all fields, including the selected filters. This could lead to a poor user experience, as the user may lose their filters and have to reselect them. It might be better to only clear the text field, preserving the filters.
Maybe. I think we should fix the 404 navigation first, then revisit the UX separately.
@brandonroberts i can fix the error clearing, and the error if user leaves input box blank and presses enter it leaded them to a 404 page
:tada: This issue has been resolved in version 2.60.0-beta.3 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 2.60.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Describe the bug
https://github.com/user-attachments/assets/b050d140-4542-4733-b42e-74cec89fe998
Steps to reproduce