-
Notifications
You must be signed in to change notification settings - Fork 193
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
Arc 968 view repos addons #2357
base: main
Are you sure you want to change the base?
Conversation
make searchbar not case sensitive re-render repo list on search clear add debouncing to search add FINISHED option in filter
static/js/jira-connected-repos.js
Outdated
$('#repo-search').on('input', function() { | ||
// re-render the original list after clearing the search bar | ||
if($(this).val().length === 0) { | ||
loadRepos(1) |
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
loadRepos(1) | |
loadRepos(1); |
static/js/jira-connected-repos.js
Outdated
@@ -1,4 +1,6 @@ | |||
$(document).ready(() => { | |||
// to get the focus back on seach bar after comp reload |
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 Typo
// to get the focus back on seach bar after comp reload | |
// to get the focus back on search bar after comp reload |
@@ -54,7 +54,7 @@ export const JiraGetConnectedRepos = async ( | |||
[Op.and]: [ | |||
{ | |||
repoName: { | |||
[Op.like]: `%${repoName}%` |
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.
Hi while you are here, can you also have a look at is this replacement vulnerable for the SQL injection attack? I suspect we should use something else instead of [Op.like]: `...${}...`
let repoSearchTimeoutId; | ||
$('#repo-search').on('input', function() { | ||
// re-render the original list after clearing the search bar | ||
if($(this).val().length === 0) { |
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 we don't have this block
if($(this).val().length === 0) {
loadRepos(1);
}
The function will still re-render the original list after clearing the search bar
after 500ms
? So above block is just to make it quicker on empty state?
What's in this PR?
add-ons and fixes:
Screen.Recording.2023-08-21.at.8.36.20.pm.mov
Why
Make the feature better
Added feature flags
NA
Affected issues
NA
How has this been tested?
Jest unit test cases and locally via atlas tunnel
Whats Next?