jenkins-bot has submitted this change and it was merged.
Change subject: Make search feel smoother
......................................................................
Make search feel smoother
* Decrease timeout
* Don't empty results before firing off api request.
Change-Id: I7f305e1437d8f92acdbfcac7837e65db41adf780
---
M resources/ext.gather.page.search/CollectionSearchPanel.js
1 file changed, 2 insertions(+), 4 deletions(-)
Approvals:
Jhernandez: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/ext.gather.page.search/CollectionSearchPanel.js
b/resources/ext.gather.page.search/CollectionSearchPanel.js
index 0052206..8355a3f 100644
--- a/resources/ext.gather.page.search/CollectionSearchPanel.js
+++ b/resources/ext.gather.page.search/CollectionSearchPanel.js
@@ -3,7 +3,7 @@
var Panel = M.require( 'Panel' ),
Icon = M.require( 'Icon' ),
SearchApi = M.require( 'modules/search/SearchApi' ),
- SEARCH_DELAY = 500,
+ SEARCH_DELAY = 200,
CollectionPageList = M.require(
'ext.gather.page.search/CollectionPageList' ),
CollectionSearchPanel;
@@ -116,13 +116,11 @@
onSearchInput: function () {
var self = this,
$input = this.$( 'input' ),
- query = $input.val(),
- $results = this.$( '.results' );
+ query = $input.val();
if ( query !== this.lastQuery ) {
this.api.abort();
clearTimeout( this.timer );
- $results.empty();
if ( query.length ) {
this.$( '.spinner' ).show();
--
To view, visit https://gerrit.wikimedia.org/r/203955
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7f305e1437d8f92acdbfcac7837e65db41adf780
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Jhernandez <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits