-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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(frontend): enhance GitHub repo picker with search and sorting #5783
Changes from 16 commits
62fae43
43e643b
e56b09e
e2a82de
d9fdd4a
e866df7
ef864ef
d32db88
8a8a227
2e8553e
9d5cc02
c579ddf
980cd4d
b799cbb
6bb99ce
89adac2
830c8b7
b2b7537
3d7a83a
4f95435
1b8a8db
09eca76
1b41f90
fc87611
e11630c
ff83e22
aab5ecb
4e883f7
652dfbc
9b012da
e91abf4
c4a1bf9
7e6b8a2
dc09c70
2801221
21ddf7c
58ee68f
dabaa1e
d3a882a
c9faf33
63fe3a9
f23dd5e
778831b
009b76f
66286b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ interface GitHubUser { | |
interface GitHubRepository { | ||
id: number; | ||
full_name: string; | ||
stargazers_count?: number; | ||
fromPublicRepoSearch?: boolean; | ||
amanape marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we now extend this interface in the relevant component, we can remove the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The fromPublicRepoSearch property has been removed from the base GitHubRepository type and moved to a component-specific GitHubRepositoryWithFlag interface. This ensures better type safety and prevents potential issues with accessing non-existent properties. (by OpenHands) |
||
} | ||
|
||
interface GitHubAppRepository { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If/when you are going to outsource the logic in
frontend/src/components/features/github/github-repo-selector.tsx
into a custom hook with TanStack Query, you should let this throw. That way we can have better error handling via the query/mutation hooks (see https://tanstack.com/query/latest/docs/framework/react/guides/query-functions)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error handling has been updated to let errors propagate through TanStack Query. This allows for better error handling at the component level using the query hooks error states. (by OpenHands)