-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Use Semantic UI's Search component for user and repo search #2636
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2636 +/- ##
=======================================
Coverage 27.11% 27.11%
=======================================
Files 86 86
Lines 17062 17062
=======================================
Hits 4627 4627
Misses 11757 11757
Partials 678 678 Continue to review full report at Codecov.
|
public/js/index.js
Outdated
$searchRepoBox.search({ | ||
minCharacters: 2, | ||
apiSettings: { | ||
url: suburl + '/api/v1/repos/search?q={query}', |
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.
uid
query parameter is missing.
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.
@daviian Fixed.
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.
Looks good! Just one nit.
public/js/index.js
Outdated
}); | ||
hideWhenLostFocus('#search-user-box .results', '#search-user-box'); | ||
} | ||
|
||
// FIXME: merge common parts in two 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.
nit: remove this comment now that it is stale
Please remove comment as @ethantkoenig mentioned, otherwise LGTM |
@ethantkoenig @daviian Done. 😃 |
LGTM |
Make LG-TM work again |
Current user and repo search input is not support keyboard navigation and must use mouse click to select item.
So I use Semantic UI's Search component replace the jquery ajax code and html generating code, for improve the UI experience.
Here is the screenshots:
New user search
New repo search
Old user search (Can only use mouse select):