diff --git a/tests/functional/comments.js b/tests/functional/comments.js index 2c60da549..746f4e3f7 100644 --- a/tests/functional/comments.js +++ b/tests/functional/comments.js @@ -79,7 +79,7 @@ define([ return this.remote .setFindTimeout(intern.config.wc.pageLoadTimeout) .get(require.toUrl(url(101))) - .sleep(500) + .sleep(2000) .findByCssSelector('.js-issue-state-button').getVisibleText() .then(function(text){ assert.equal('Reopen Issue', text); @@ -89,7 +89,7 @@ define([ .findByCssSelector('textarea.Comment-text') .type('test comment') .end() - .sleep(500) + .sleep(2000) .findByCssSelector('.js-issue-state-button').getVisibleText() .then(function(text){ assert.equal('Reopen and comment', text); @@ -110,11 +110,11 @@ define([ .findByCssSelector('textarea.Comment-text') .type('Today\'s date is ' + new Date().toDateString()) .end() - .sleep(500) + .sleep(2000) // click the comment button .findByCssSelector('.js-issue-comment-button').click() .end() - .sleep(500) + .sleep(2000) .findAllByCssSelector('.Comment:not(.Comment--form)') .then(function(elms){ allCommentsLength = elms.length; diff --git a/tests/functional/index.js b/tests/functional/index.js index cbfddec13..9eb731e9c 100644 --- a/tests/functional/index.js +++ b/tests/functional/index.js @@ -116,35 +116,35 @@ define([ .end(); }, - 'browse issues (untriaged)': function() { + 'browse issues (new)': function() { return this.remote .get(require.toUrl(url)) - .findByCssSelector('#untriaged h3').getVisibleText() + .findByCssSelector('#new h3').getVisibleText() .then(function (text) { - assert.equal(text, 'Untriaged Issues'); + assert.equal(text, 'New Issues'); }) .end() - .findAllByCssSelector('#untriaged .IssueItem.IssueItem--untriaged') + .findAllByCssSelector('#new .IssueItem.IssueItem--new') .then(function (elms) { assert.equal(elms.length, 4, '4 issues should be displayed'); }) .end() - .findByCssSelector('.IssueItem--untriaged .IssueItem-count').getVisibleText() + .findByCssSelector('.IssueItem--new .IssueItem-count').getVisibleText() .then(function (text) { assert.match(text, /^Issue\s(\d+)$/, 'Issue should have a number'); }) .end() - .findByCssSelector('.IssueItem--untriaged .IssueItem-header a').getAttribute('href') + .findByCssSelector('.IssueItem--new .IssueItem-header a').getAttribute('href') .then(function (text) { assert.match(text, /^\/issues\/\d+$/, 'Link should have a number'); }) .end() - .findByCssSelector('.IssueItem--untriaged .IssueItem-header').getVisibleText() + .findByCssSelector('.IssueItem--new .IssueItem-header').getVisibleText() .then(function (text) { assert.match(text, /^Issue\s\d+:\s.+$/, 'Issue should have a non-empty title'); }) .end() - .findByCssSelector('.IssueItem--untriaged .IssueItem-metadata').getVisibleText() + .findByCssSelector('.IssueItem--new .IssueItem-metadata').getVisibleText() .then(function (text) { assert.match(text, /comments:\s\d+$/, 'Issue should display number of comments'); assert.match(text, /^Opened:\s\d{4}\-\d{2}\-\d{2}.+/, 'Issue should display creation date'); diff --git a/tests/functional/issue-list.js b/tests/functional/issue-list.js index eb095517a..227a63d58 100644 --- a/tests/functional/issue-list.js +++ b/tests/functional/issue-list.js @@ -152,19 +152,19 @@ define([ .findByCssSelector('.IssueList-search-form').click() .type('taco') .end() - .findAllByCssSelector('button.wc-Filter--untriaged').click() + .findAllByCssSelector('button.wc-Filter--new').click() .end() .findByCssSelector('.IssueList-search-form').getVisibleText() .then(function (text) { assert.equal(text, '', 'Clicking filter should empty search text'); }) .end() - .findAllByCssSelector('button.wc-Filter--untriaged').click() + .findAllByCssSelector('button.wc-Filter--new').click() .end() .findByCssSelector('.IssueList-search-form').click() .type('taco') .end() - .findAllByCssSelector('button.wc-Filter--untriaged').getAttribute('class') + .findAllByCssSelector('button.wc-Filter--new').getAttribute('class') .then(function (className) { assert.notInclude(className, 'is-active', 'Searching should clear all filters'); }); diff --git a/tests/functional/issues.js b/tests/functional/issues.js index c6be3fde4..6179831bb 100644 --- a/tests/functional/issues.js +++ b/tests/functional/issues.js @@ -43,7 +43,7 @@ define([ .setFindTimeout(intern.config.wc.pageLoadTimeout) .get(require.toUrl(url(69))) .findByCssSelector('.js-issue-state-button').click() - .sleep(1000) + .sleep(2000) .end() .findByCssSelector('.Issue-state').getVisibleText() .then(function (text) { @@ -56,7 +56,7 @@ define([ }) .end() .findByCssSelector('.js-issue-state-button').click() - .sleep(1000) + .sleep(2000) .end() .findByCssSelector('.Issue-state').getVisibleText() .then(function (text) { diff --git a/webcompat/api/endpoints.py b/webcompat/api/endpoints.py index eeeb461bb..fbe27155c 100644 --- a/webcompat/api/endpoints.py +++ b/webcompat/api/endpoints.py @@ -25,7 +25,7 @@ from webcompat.helpers import get_request_headers from webcompat.helpers import get_user_info from webcompat.helpers import normalize_api_params -from webcompat.issues import filter_untriaged +from webcompat.issues import filter_new from webcompat.issues import proxy_request @@ -98,7 +98,7 @@ def get_issue_category(issue_category): '''Return all issues for a specific category. issue_category can be of x types: - * untriaged (We take care in case there’s no bug) + * new * contactready * needsdiagnosis * sitewait @@ -119,16 +119,16 @@ def get_issue_category(issue_category): issues = github.raw_request('GET', issues_path, params=params) else: issues = proxy_request('get', params=params) - # Note that 'untriaged' here is primarily used on the hompage. - # For paginated results on the /issues page, see /issues/search/untriaged. - elif issue_category == 'untriaged': + # Note that 'new' here is primarily used on the hompage. + # For paginated results on the /issues page, see /issues/search/new. + elif issue_category == 'new': if g.user: issues = github.raw_request('GET', issues_path, params=params) else: issues = proxy_request('get', params=params) - # Do not send random JSON to filter_untriaged + # Do not send random JSON to filter_new if issues.status_code == 200: - return (filter_untriaged(json.loads(issues.content)), + return (filter_new(json.loads(issues.content)), issues.status_code, get_headers(issues)) else: return ({}, issues.status_code, get_headers(issues)) @@ -193,7 +193,7 @@ def get_category_from_search(issue_category): if issue_category in category_list: query_string = 'label:{0}'.format(issue_category) - elif issue_category == 'untriaged': + elif issue_category == 'new': query_string = ('state:open -label:contactready ' '-label:sitewait -label:needsdiagnosis') return get_search_results(query_string, params) diff --git a/webcompat/issues.py b/webcompat/issues.py index 4c4e72711..67cd45c31 100644 --- a/webcompat/issues.py +++ b/webcompat/issues.py @@ -50,13 +50,13 @@ def report_issue(form, proxy=False): return github.post('repos/{0}'.format(REPO_URI), build_formdata(form)) -def filter_untriaged(issues): - '''Return the list of untriaged issues, encoded as JSON. +def filter_new(issues): + '''Return the list of new issues, encoded as JSON. - "untriaged" means anything that isn't an issue with a "contactready", + "new" means anything that isn't an issue with a "contactready", "sitewait", or "needsdiagnosis" label. ''' - def is_untriaged(issue): + def is_new(issue): '''Filter function.''' match = True if issue.get('labels') == []: @@ -71,4 +71,4 @@ def is_untriaged(issue): match = False return match - return json.dumps([issue for issue in issues if is_untriaged(issue)]) + return json.dumps([issue for issue in issues if is_new(issue)]) diff --git a/webcompat/static/css/development/base/variable.css b/webcompat/static/css/development/base/variable.css index 64192bc10..ef4b02378 100644 --- a/webcompat/static/css/development/base/variable.css +++ b/webcompat/static/css/development/base/variable.css @@ -16,7 +16,7 @@ --wc-background-light: var(--wc-background-dark); /* #FBC55F Light Yellow */ --wc-variant-background-dark: #404040; /* Dark Gray */ --wc-variant-background-light: #c2c2c2; /* Dark Light */ - --wc-state-untriaged: #ff8364; /* light orange */ + --wc-state-new: #ff8364; /* light orange */ --wc-state-need: #efce82; /* light brown */ --wc-state-needcontact : #b9edce ; /* light green */ --wc-state-ready: #7abce1; /* light blue*/ diff --git a/webcompat/static/css/development/components/box.css b/webcompat/static/css/development/components/box.css index 607258c8d..df58e0fda 100644 --- a/webcompat/static/css/development/components/box.css +++ b/webcompat/static/css/development/components/box.css @@ -25,7 +25,7 @@ font-weight:bold; } .wc-Box--reporting { - border-color: var(--wc-state-untriaged); + border-color: var(--wc-state-new); } .wc-Box--analysis { border-color: var(--wc-state-need); diff --git a/webcompat/static/css/development/components/filter.css b/webcompat/static/css/development/components/filter.css index a5bf7665f..b9384b036 100644 --- a/webcompat/static/css/development/components/filter.css +++ b/webcompat/static/css/development/components/filter.css @@ -19,12 +19,12 @@ .wc-Filter.is-active { color:#fff; } - .wc-Filter--untriaged { - border-color:var(--wc-state-untriaged); + .wc-Filter--new { + border-color:var(--wc-state-new); } - .wc-Filter--untriaged:hover, - .wc-Filter--untriaged.is-active { - background-color:var(--wc-state-untriaged); + .wc-Filter--new:hover, + .wc-Filter--new.is-active { + background-color:var(--wc-state-new); } .wc-Filter--need { border-color:var(--wc-state-need); diff --git a/webcompat/static/css/development/components/issue-item.css b/webcompat/static/css/development/components/issue-item.css index 9cdce177d..0d37738f6 100644 --- a/webcompat/static/css/development/components/issue-item.css +++ b/webcompat/static/css/development/components/issue-item.css @@ -18,8 +18,8 @@ margin:0; background-color: transparent; } -.IssueItem--untriaged { - border-left: 5px solid var(--wc-state-untriaged); +.IssueItem--new { + border-left: 5px solid var(--wc-state-new); } .IssueItem--need { border-left: 5px solid var(--wc-state-need); diff --git a/webcompat/static/css/development/page/issues.css b/webcompat/static/css/development/page/issues.css index 3f307cb8f..25af7e642 100644 --- a/webcompat/static/css/development/page/issues.css +++ b/webcompat/static/css/development/page/issues.css @@ -73,9 +73,9 @@ font-size:.8em; } } -/*Untriaged*/ -.Issue-state--untriaged { - background-color: var(--wc-state-untriaged); +/*New*/ +.Issue-state--new { + background-color: var(--wc-state-new); } /*Needs Diagnosis*/ .Issue-state--need { diff --git a/webcompat/static/js/lib/diagnose.js b/webcompat/static/js/lib/diagnose.js index df4a20370..c0c398c96 100644 --- a/webcompat/static/js/lib/diagnose.js +++ b/webcompat/static/js/lib/diagnose.js @@ -20,9 +20,9 @@ diagnose.ContactReadyCollection = Backbone.Collection.extend({ url: '/api/issues/category/contactready' }); -diagnose.UntriagedCollection = Backbone.Collection.extend({ +diagnose.NewCollection = Backbone.Collection.extend({ model: issues.Issue, - url: '/api/issues/category/untriaged' + url: '/api/issues/category/new' }); diagnose.SiteWaitCollection = Backbone.Collection.extend({ @@ -65,29 +65,27 @@ diagnose.NeedsDiagnosisView = Backbone.View.extend({ render: function() { this.$el.html(this.template({ // manually slice out the latest 4. - // in the future we'll allow the user to "scroll" these. needsDiagnosis: this.issues.toJSON().slice(0,4) })); return this; } }); -diagnose.UntriagedView = Backbone.View.extend({ - el: $('#untriaged'), +diagnose.NewView = Backbone.View.extend({ + el: $('#new'), initialize: function() { var self = this; var headersBag = {headers: {'Accept': 'application/json'}}; - this.issues = new diagnose.UntriagedCollection(); + this.issues = new diagnose.NewCollection(); this.issues.fetch(headersBag).success(function() { self.render(); }).error(function(){}); }, - template: _.template($('#untriaged-tmpl').html()), + template: _.template($('#new-tmpl').html()), render: function() { this.$el.html(this.template({ // manually slice out the latest 4. - // in the future we'll allow the user to "scroll" these. - untriaged: this.issues.toJSON().slice(0,4) + newIssues: this.issues.toJSON().slice(0,4) })); return this; } @@ -107,7 +105,6 @@ diagnose.SiteWaitView = Backbone.View.extend({ render: function() { this.$el.html(this.template({ // manually slice out the latest 4. - // in the future we'll allow the user to "scroll" these. sitewait: this.issues.toJSON().slice(0,4) })); return this; @@ -128,7 +125,6 @@ diagnose.ContactReadyView = Backbone.View.extend({ render: function() { this.$el.html(this.template({ // manually slice out the latest 4. - // in the future we'll allow the user to "scroll" these. contactReady: this.issues.toJSON().slice(0,4) })); return this; @@ -138,6 +134,6 @@ diagnose.ContactReadyView = Backbone.View.extend({ $(function(){ new diagnose.NeedsDiagnosisView(); new diagnose.ContactReadyView(); - new diagnose.UntriagedView(); + new diagnose.NewView(); new diagnose.SiteWaitView(); }); diff --git a/webcompat/static/js/lib/issue-list.js b/webcompat/static/js/lib/issue-list.js index eb001174b..2c152f74b 100644 --- a/webcompat/static/js/lib/issue-list.js +++ b/webcompat/static/js/lib/issue-list.js @@ -276,10 +276,10 @@ issueList.IssueView = Backbone.View.extend({ }, template: _.template($('#issuelist-issue-tmpl').html()), loadIssues: function() { - // First checks URL params, e.g., /?untriaged=1 and activates the untriaged filter, + // First checks URL params, e.g., /?new=1 and activates the new filter, // or loads default unsorted/unfiltered issues var category; - var filterRegex = /\?(untriaged|needsdiagnosis|contactready|sitewait|closed)=1/; + var filterRegex = /\?(new|needsdiagnosis|contactready|sitewait|closed)=1/; if (category = window.location.search.match(filterRegex)) { // If there was a match, load the relevant results and fire an event // to notify the button to activate. @@ -386,7 +386,7 @@ issueList.IssueView = Backbone.View.extend({ // note: until GitHub fixes a bug where requesting issues filtered by labels // doesn't return pagination via Link, we get those results via the Search API. - var searchCategories = ['untriaged', 'contactready', 'needsdiagnosis', 'sitewait']; + var searchCategories = ['new', 'contactready', 'needsdiagnosis', 'sitewait']; var params = $.extend(this.issues.params, this.getPageLimit()); // note: if query is the empty string, it will load all issues from the diff --git a/webcompat/static/js/lib/models/issue.js b/webcompat/static/js/lib/models/issue.js index 01ee6b1ef..0fa14ca4b 100644 --- a/webcompat/static/js/lib/models/issue.js +++ b/webcompat/static/js/lib/models/issue.js @@ -36,9 +36,9 @@ this.set('stateClass', 'need'); return 'Needs Diagnosis'; } - //Untriaged is the default value. - this.set('stateClass', 'untriaged'); - return 'Untriaged Issue'; + //New is the default value. + this.set('stateClass', 'new'); + return 'New Issue'; }, parse: function(response) { this.set({ diff --git a/webcompat/templates/browse-issues.html b/webcompat/templates/browse-issues.html index b20af65dd..f7dcd28f4 100644 --- a/webcompat/templates/browse-issues.html +++ b/webcompat/templates/browse-issues.html @@ -2,8 +2,8 @@