From e907b2126ba64d494e49a0937f0e5aece1a52610 Mon Sep 17 00:00:00 2001 From: Adam Auskerin Date: Thu, 2 Feb 2017 15:38:01 +0000 Subject: [PATCH 1/3] Fix release cut off check Previously the cut off warning would always appear if the current hour was 14 or higher. This meant that a release two or more days into the future could show the warning prematurely (e.g. we should be able to add tickets to a release on Wednesday after 2pm on Monday but the warning was still showing). Now, the cut off warning actually takes into account the date of the release and only shows the warning after 2pm on the last working day before the release. --- public/javascripts/releases-controllers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/javascripts/releases-controllers.js b/public/javascripts/releases-controllers.js index 0cff2a2..0f3ef3b 100644 --- a/public/javascripts/releases-controllers.js +++ b/public/javascripts/releases-controllers.js @@ -34,7 +34,7 @@ if ([2, 3, 4, 5, 6].indexOf(cutOffDate.getDay()) >= 0) { // Tuesday -> Saturday uses yesterday cutOffDate.setDate(cutOffDate.getDate() - 1); - } else if (cutOffDate.getDay() == 7) { + } else if (cutOffDate.getDay() === 0) { //Sunday uses previous friday cutOffDate.setDate(cutOffDate.getDate() - 2); } else { @@ -48,7 +48,7 @@ }; var pastCutOff = function() { - return (new Date()).getHours() >= 14; + return (new Date()) >= cutOffDate; }; var cutOffUpdateInterval = 10 * 1000; var updatePastCutOff = function() { From 7b3b91b5068878c1d0988315c791ffdb4f90693b Mon Sep 17 00:00:00 2001 From: Adam Auskerin Date: Tue, 14 Nov 2017 11:33:55 +0000 Subject: [PATCH 2/3] Allow audit URLs to be used instead of diffs Sometimes, we need to release quick fixes that were not reviewed. We still want to add these to the release app for visibility and, rather than linking to nothing, we can link to the audit on phab. For example, link to http://phab.dev.ebuyer.com/rGENONEfcc395703a1f8edee04db518ed56c121705900fe rather than http://phab.dev.ebuyer.com/D5610 This patch updates the Add Diff form to indicate this possibility, and improves the styling of the release view so that lengthy commit hashes do not overflow other elements of a release (such as the Release button/Released status text). --- public/stylesheets/style.css | 9 +++++++-- views/partials/release-ticket-diff-add.jade | 4 ++-- views/partials/release-view.jade | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 8a25a9e..029cc7f 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -7,10 +7,15 @@ body { padding-top: 50px; } } /** angular-ui */ -.nav, .pagination, .carousel, .panel-title a { - cursor: pointer; +.nav, .pagination, .carousel, .panel-title a { + cursor: pointer; } .diff-row { margin-bottom: 15px; } + +.diff-link { + overflow: hidden; + text-overflow: ellipsis; +} diff --git a/views/partials/release-ticket-diff-add.jade b/views/partials/release-ticket-diff-add.jade index 0494d65..e92ed1d 100644 --- a/views/partials/release-ticket-diff-add.jade +++ b/views/partials/release-ticket-diff-add.jade @@ -9,12 +9,12 @@ div(class='modal-body') ng-submit='submit(addDiff.$valid)' ) div(class='form-group') - label(class='control-label col-sm-2') Phabricator Diff + label(class='control-label col-sm-2') Phabricator Diff/Audit div(class='col-sm-10') input( type='text', class='form-control', - placeholder='D####', + placeholder='D#### or r[REPO][commit hash]', required, ng-model='newDiff.diffId' ) diff --git a/views/partials/release-view.jade b/views/partials/release-view.jade index d2829c1..2c23bdc 100644 --- a/views/partials/release-view.jade +++ b/views/partials/release-view.jade @@ -65,7 +65,7 @@ div(ng-show="release") ng-show='diff.repoName', title='Added {{ diff.created | date:"EEEE, MMMM d yyyy HH:mm:ss" }}' ) {{diff.repoName}} - div(class='col-sm-2', ng-class='{"text-muted": diff.released}') + div(class='col-sm-2 diff-link', ng-class='{"text-muted": diff.released}') a(href='http://phab.dev.ebuyer.com/{{diff.diffId}}') {{diff.diffId}} div(class='col-sm-2', ng-class='{"text-success": diff.released && !diff.rolledBack}') span(ng-show='diff.released && !diff.rolledBack') From 19a238cedfdf3ec4670aad8126bd863a9116c29b Mon Sep 17 00:00:00 2001 From: Adam Auskerin Date: Tue, 14 Nov 2017 11:51:36 +0000 Subject: [PATCH 3/3] Improve terminology from Audit to Commit We can link to any commit on phabricator, regardless of whether or not that commit requires auditing. --- views/partials/release-ticket-diff-add.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/partials/release-ticket-diff-add.jade b/views/partials/release-ticket-diff-add.jade index e92ed1d..37bda1d 100644 --- a/views/partials/release-ticket-diff-add.jade +++ b/views/partials/release-ticket-diff-add.jade @@ -9,7 +9,7 @@ div(class='modal-body') ng-submit='submit(addDiff.$valid)' ) div(class='form-group') - label(class='control-label col-sm-2') Phabricator Diff/Audit + label(class='control-label col-sm-2') Phabricator Diff/Commit div(class='col-sm-10') input( type='text',