From 796e7429bf318ef0dd523b13065873e3c891fbd3 Mon Sep 17 00:00:00 2001 From: Lisa Passing Date: Tue, 7 Apr 2015 14:24:41 +0200 Subject: [PATCH 1/5] fix ticks on landing --- app/styles/app/landing.sass | 12 +++++++++--- app/styles/app/layout.sass | 4 ++-- app/styles/app/modules/icons.sass | 9 ++++++--- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/app/styles/app/landing.sass b/app/styles/app/landing.sass index 9299efd1..92cd96fa 100644 --- a/app/styles/app/landing.sass +++ b/app/styles/app/landing.sass @@ -337,14 +337,20 @@ padding-left: 30px ul - list-style-image: url('../images/landing-page/features-check.svg') - padding-left: 1.5em + @include resetul + margin-top: 1.6rem; li font-color: #606162 font-size: 1.7em line-height: 1.7em - font-weight: 300 + &:before + @extend %icon + content: "" + background-image: url('../images/landing-page/features-check.svg') + width: 0.7em + height: 0.7em + margin-right: .3em .build-flows text-align: center diff --git a/app/styles/app/layout.sass b/app/styles/app/layout.sass index f1b6a6a8..b627aba6 100644 --- a/app/styles/app/layout.sass +++ b/app/styles/app/layout.sass @@ -52,8 +52,8 @@ margin-bottom: -99999px padding-bottom: 100034px - #left - z-index: -1 + // #left + // z-index: -1 @media #{$large-up} diff --git a/app/styles/app/modules/icons.sass b/app/styles/app/modules/icons.sass index c13230aa..8ad82bd9 100644 --- a/app/styles/app/modules/icons.sass +++ b/app/styles/app/modules/icons.sass @@ -1,11 +1,14 @@ -.icon - width: 1em - height: 1em +%icon display: inline-block background: size: 100% repeat: no-repeat +.icon + width: 1em + height: 1em + @extend %icon + .icon-cal, .icon--cal background-image: inline-image('svg/finished-icon.svg') From 32124418a01f7b10fe75f3f099f0f838762dbac9 Mon Sep 17 00:00:00 2001 From: Lisa Passing Date: Tue, 7 Apr 2015 14:27:36 +0200 Subject: [PATCH 2/5] fix footer width without losing clickability of #left --- app/styles/app/layout.sass | 3 --- app/styles/app/layouts/footer.sass | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/styles/app/layout.sass b/app/styles/app/layout.sass index b627aba6..5d455793 100644 --- a/app/styles/app/layout.sass +++ b/app/styles/app/layout.sass @@ -52,9 +52,6 @@ margin-bottom: -99999px padding-bottom: 100034px - // #left - // z-index: -1 - @media #{$large-up} #left, #right, .wrapper-main diff --git a/app/styles/app/layouts/footer.sass b/app/styles/app/layouts/footer.sass index 55f0f88b..b4b1e9eb 100644 --- a/app/styles/app/layouts/footer.sass +++ b/app/styles/app/layouts/footer.sass @@ -7,6 +7,7 @@ a text-decoration : none footer + position: relative padding : 20px 0 background-color : $footer-bg-color min-height : 334px From 17a8edba50a22856da043ae6df4113445a2e372e Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Tue, 7 Apr 2015 14:05:24 +0200 Subject: [PATCH 3/5] Show only finished repositories on landing page --- app/routes/home.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/routes/home.coffee b/app/routes/home.coffee index 9a79a480..772b0ea5 100644 --- a/app/routes/home.coffee +++ b/app/routes/home.coffee @@ -9,7 +9,9 @@ Route = BasicRoute.extend isLoadedBinding: 'repos.isLoaded' repos: @store.filter 'repo', (repo) -> buildId = repo.get('lastBuildId') - store.hasRecordForId('build', buildId) + if store.hasRecordForId('build', buildId) + state = repo.get('lastBuild.state') + state == 'passed' || state == 'failed' sorted: Ember.computed.sort('repos', 'sortedReposKeys') content: limit('sorted', 'limit') sortedReposKeys: ['sortOrder:asc'] @@ -40,7 +42,7 @@ Route = BasicRoute.extend if @get('repos.length') < 3 return true - if event == 'build:started' && @get('letMoreReposThrough') + if event == 'build:finished' && @get('letMoreReposThrough') @set('letMoreReposThrough', false) return true From 918b6e043e852a529b85b2358679237eaac72976 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Tue, 7 Apr 2015 14:42:38 +0200 Subject: [PATCH 4/5] If there's no repos on landing page for 10s, fetch some --- app/models/repo.coffee | 10 +++++----- app/routes/home.coffee | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/app/models/repo.coffee b/app/models/repo.coffee index fdfe7ebf..b3083982 100644 --- a/app/models/repo.coffee +++ b/app/models/repo.coffee @@ -108,12 +108,12 @@ Repo = Model.extend ).property('_lastBuildDuration', 'lastBuildStartedAt', 'lastBuildFinishedAt') sortOrder: (-> - # cuz sortAscending seems buggy when set to false - if lastBuildFinishedAt = @get('lastBuildFinishedAt') - - new Date(lastBuildFinishedAt).getTime() + state = @get('lastBuildState') + if state != 'passed' && state != 'failed' + 0 else - - new Date('9999').getTime() - parseInt(@get('lastBuildId')) - ).property('lastBuildFinishedAt', 'lastBuildId') + parseInt(@get('lastBuildId')) + ).property('lastBuildId', 'lastBuildState') stats: (-> if @get('slug') diff --git a/app/routes/home.coffee b/app/routes/home.coffee index 772b0ea5..c11760cc 100644 --- a/app/routes/home.coffee +++ b/app/routes/home.coffee @@ -12,9 +12,11 @@ Route = BasicRoute.extend if store.hasRecordForId('build', buildId) state = repo.get('lastBuild.state') state == 'passed' || state == 'failed' - sorted: Ember.computed.sort('repos', 'sortedReposKeys') + external: [] + withExternal: Ember.computed.union('repos', 'external') + sorted: Ember.computed.sort('withExternal', 'sortedReposKeys') content: limit('sorted', 'limit') - sortedReposKeys: ['sortOrder:asc'] + sortedReposKeys: ['sortOrder:desc'] limit: 3 ).create() @@ -24,6 +26,12 @@ Route = BasicRoute.extend @set('letMoreReposThrough', true) , 5000 + setTimeout => + unless repos.get('length') + @store.find('repo').then (reposFromRequest) -> + repos.get('external').pushObjects reposFromRequest.toArray().slice(0, 3) + , 10000 + @_super.apply this, arguments activate: -> @@ -42,7 +50,9 @@ Route = BasicRoute.extend if @get('repos.length') < 3 return true - if event == 'build:finished' && @get('letMoreReposThrough') + if event == 'build:finished' && + ['passed', 'failed'].indexOf(data.build.state) != -1 && + @get('letMoreReposThrough') @set('letMoreReposThrough', false) return true From 6ac359d26de9daf0d4dc41e09df77759f1a1b507 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Tue, 7 Apr 2015 14:44:54 +0200 Subject: [PATCH 5/5] Change default page title --- waiter/lib/travis/web/app.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waiter/lib/travis/web/app.rb b/waiter/lib/travis/web/app.rb index bf5ba49a..dd50fe42 100644 --- a/waiter/lib/travis/web/app.rb +++ b/waiter/lib/travis/web/app.rb @@ -169,7 +169,7 @@ class Travis::Web::App end def title - default_title = "Travis CI - Free Hosted Continuous Integration Platform for the Open Source Community" + default_title = "Travis CI - Test and deploy your code in confidence" ENV['SITE_TITLE'] || default_title end