Changeset 158094 in webkit
- Timestamp:
- Oct 26, 2013 5:48:30 PM (10 years ago)
- Location:
- trunk/Websites/test-results
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Websites/test-results/ChangeLog
r158093 r158094 1 2013-10-26 Ryosuke Niwa <rniwa@webkit.org> 2 3 New flakiness dashboard should support substring matching 4 https://bugs.webkit.org/show_bug.cgi?id=123393 5 6 Reviewed by Alexey Proskuryakov. 7 8 Addressed the use cases by 9 1. Always showing the candidate even when there is exactly one test matching the current value. 10 2. Adding all tests that match the current value upon the user pressing enter key. 11 12 * public/index.html: 13 (fetchManifest): Add all tests that match the current value. Confirm whether the user really 14 want to add all the tests when there are more than 15 tests to add. 15 * public/js/autocompleter.js: 16 (Autocompleter.prototype.filterCandidates): Extracted from _updateCandidates. 17 (Autocompleter.prototype._updateCandidates): Show the candidate window even when there is 18 exactly one test that matches the criteria so that the user can select this test. 19 1 20 2013-10-26 Ryosuke Niwa <rniwa@webkit.org> 2 21 -
trunk/Websites/test-results/public/index.html
r158079 r158094 519 519 input.autocompleter = new Autocompleter(input, testNames); 520 520 521 input.form.onsubmit = function (event) { 522 addTests(input.value); 523 event.preventDefault(); 524 return false; 525 } 526 527 function addTests(filter) { 528 var candidates = input.autocompleter.filterCandidates(filter); 529 if (candidates.length > 15) { 530 if (!confirm('Are you sure you want to add ' + candidates.length + ' tests that match this substring?')) 531 return; 532 } 533 for (var i = 0; i < candidates.length; i++) 534 TestResultsView.fetchTest(candidates[i]); 535 TestResultsView.updateLocationHash(); 536 } 537 521 538 var builderListView = document.getElementById('builderListView'); 522 539 TestResultsView._sortObjectsByName(response['builders']).forEach(function (builder) { -
trunk/Websites/test-results/public/js/autocompleter.js
r157555 r158094 11 11 inputElement.addEventListener('keyup', this.update.bind(this)); 12 12 inputElement.addEventListener('keydown', this.navigate.bind(this)); 13 } 14 15 Autocompleter.prototype.filterCandidates = function (filter) { 16 return this._list.filter(function (testName) { return testName.indexOf(filter) >= 0; }); 13 17 } 14 18 … … 29 33 return false; 30 34 31 var candidates = this. _list.filter(function (testName) { return testName.indexOf(filter) >= 0; });32 if (candidates.length > 50 || candidates.length == 1)35 var candidates = this.filterCandidates(filter); 36 if (candidates.length > 50) 33 37 candidates = []; 34 38 this._candidates = candidates;
Note: See TracChangeset
for help on using the changeset viewer.