From 129674aa25d8564c628cebe64e2ea32e275bd6ff Mon Sep 17 00:00:00 2001 From: Lisa P Date: Thu, 3 Dec 2015 13:19:33 +0100 Subject: [PATCH 1/7] fix branch-row-unit test --- tests/unit/components/branch-row-test.coffee | 57 ++++++++++++++++++++ tests/unit/components/branch-row.coffee | 51 ------------------ 2 files changed, 57 insertions(+), 51 deletions(-) create mode 100644 tests/unit/components/branch-row-test.coffee delete mode 100644 tests/unit/components/branch-row.coffee diff --git a/tests/unit/components/branch-row-test.coffee b/tests/unit/components/branch-row-test.coffee new file mode 100644 index 00000000..06b87690 --- /dev/null +++ b/tests/unit/components/branch-row-test.coffee @@ -0,0 +1,57 @@ +`import { test, moduleForComponent } from 'ember-qunit'` + +moduleForComponent 'branch-row', 'BranchRowComponent', { + # specify the other units that are required for this test + needs: ['helper:format-time', 'helper:format-duration', 'helper:pretty-date', 'helper:format-sha', + 'component:build-tile', 'component:status-icon', 'component:request-icon', 'component:loading-indicator'] +} + +test 'it renders', -> + + attributes = { + name: "master" + repository: { + id: 15038 + name: "php-test-staging" + slug: "travis-repos/php-test-staging" + } + default_branch: true + exists_on_github: true + last_build: { + id: 393177 + number: "1" + state: "passed" + duration: 22 + event_type: "push" + previous_state: null + started_at: "2015-03-10T23:19:31Z" + finished_at: "2015-03-10T23:19:45Z" + commit: { + id: 160181 + sha: "a82f6ba76c7b729375ed6a1d7a26b765f694df12" + ref: "refs/heads/master" + message: "Add money example as hello world" + compare_url: "https://github.com/travis-repos/php-test-staging/compare/3d86ee98be2b...a82f6ba76c7b" + committed_at: "2014-11-20T18:34:04Z" + committer: { + name: "Dan Buch" + avatar_url: "https://0.gravatar.com/avatar/563fd372b4d51781853bc85147f06a36" + } + author: { + name: "Dan Buch" + avatar_url: "https://0.gravatar.com/avatar/563fd372b4d51781853bc85147f06a36" + } + } + } + } + + + component = @subject(build: attributes) + + @append() + + ok component.$().hasClass('passed'), 'component should have state class (passed)' + equal component.$('.row-name .label-align').text().trim(), 'master', 'should display correct branch name' + equal component.$('.row-request .label-align').text().trim(), '#1 passed', 'should display build number and state' + equal component.$('.row-commiter .label-align').text().trim(), 'Dan Buch', 'should display correct commiter name' + equal component.$('.row-commit .label-align').text().trim(), 'a82f6ba', 'should display correct commit sha' diff --git a/tests/unit/components/branch-row.coffee b/tests/unit/components/branch-row.coffee deleted file mode 100644 index fb617ecd..00000000 --- a/tests/unit/components/branch-row.coffee +++ /dev/null @@ -1,51 +0,0 @@ -`import { test, moduleForComponent } from 'ember-qunit'` - -moduleForComponent 'branch-row', 'BranchRowComponent', { - # specify the other units that are required for this test - needs: ['helper:format-time', 'helper:format-duration', 'helper:format-sha', 'component:status-icon', 'component:request-icon'] -} - -test 'it renders', -> - - attributes = { - name: "local-test", - repository: { - id: 13661, - slug: "meatballhat/yolo-octo-adventure", - default_branch: { - name: "master", - last_build: { - id: 434835, - number: "1086", - state: "passed", - duration: 11, - event_type: "push", - previous_state: "passed", - started_at: "2015-08-24T21:34:22Z", - finished_at: "2015-08-24T21:35:14Z", - commit: { - sha: "0e9d8ebc78d2192cc599580751763a5dd6be0ccd", - committer: { - name: "Dan Buch", - avatar_url: "https://0.gravatar.com/avatar/563fd372b4d51781853bc85147f06a36" - }, - author: { - name: "Dan Buch", - avatar_url: "https://0.gravatar.com/avatar/563fd372b4d51781853bc85147f06a36" - } - } - } - } - } - } - - - component = @subject(repo: attributes) - - @append() - - ok component.$().hasClass('passed'), 'component should have state class (passed)' - equal component.$('.row-name').text().trim(), 'master', 'should display correct branch name' - equal component.$('.row-request').text().trim(), '#1086 passed', 'should display build number and state' - equal component.$('.row-commiter').text().trim(), 'Dan Buch', 'should display correct commiter name' - equal component.$('.row-commit').text().trim(), '0e9d8eb', 'should display correct commit sha' From e0629a1571f9a5ea5efd6916acfa509356f03558 Mon Sep 17 00:00:00 2001 From: Lisa P Date: Thu, 3 Dec 2015 14:01:11 +0100 Subject: [PATCH 2/7] change to new icons for key and fingerprint --- app/styles/app/layouts/settings.sass | 15 ++----------- app/styles/app/modules/icons.sass | 19 ++++++++++++---- public/images/line-icons/icon-fingerprint.svg | 22 +++++++++++++++++++ public/images/line-icons/icon-key.svg | 11 ++++++++++ 4 files changed, 50 insertions(+), 17 deletions(-) create mode 100644 public/images/line-icons/icon-fingerprint.svg create mode 100644 public/images/line-icons/icon-key.svg diff --git a/app/styles/app/layouts/settings.sass b/app/styles/app/layouts/settings.sass index 11446efa..8cbceb29 100644 --- a/app/styles/app/layouts/settings.sass +++ b/app/styles/app/layouts/settings.sass @@ -88,12 +88,6 @@ @extend %settings-name-section width: 100% margin-bottom: 1em - .icon-key - @extend %icon - @extend .icon-key - width: 1.2em - height: 1.3em - @media #{$medium-up} width: 32% margin-bottom: 0 @@ -110,16 +104,11 @@ display: inline-block vertical-align: middle overflow: hidden + color: #8e8f8e .ssh-key-value @extend %settings-value-section word-break: break-all - .icon-fingerprint - @extend %icon - @extend .icon-fingerprint - width: 1.3em - height: 1.3em - margin-right: .5em @media #{$medium-up} width: grid-calc(6, 12) word-break: normal @@ -188,7 +177,7 @@ @extend .icon-delete-disabled display: block width: 1.1em - height: 1.3em + height: 1.4em margin: .2em auto 0 diff --git a/app/styles/app/modules/icons.sass b/app/styles/app/modules/icons.sass index cedcf80f..cea8b89a 100644 --- a/app/styles/app/modules/icons.sass +++ b/app/styles/app/modules/icons.sass @@ -67,12 +67,23 @@ .icon-delete-disabled @extend %icon-line-trashcan-disabled +%icon-line-key + background-image: url('data:image/svg+xml;utf8,') .icon-key - background-image: inline-image('svg/key.svg') - + @extend %icon + @extend %icon-line-key + width: 1.2em + height: 1.3em + background-position: 0 6px + margin-right: .3em +%icon-line-fingerprint + background-image: url('data:image/svg+xml;utf8,') .icon-fingerprint - background-image: inline-image('svg/fingerprint.svg') - + @extend %icon + @extend %icon-line-fingerprint + width: 1.3em + height: 1.3em + margin-right: .3em %icon-line-calendar background-image: inline-image('line-icons/icon-cal.svg') diff --git a/public/images/line-icons/icon-fingerprint.svg b/public/images/line-icons/icon-fingerprint.svg new file mode 100644 index 00000000..799b9c15 --- /dev/null +++ b/public/images/line-icons/icon-fingerprint.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + diff --git a/public/images/line-icons/icon-key.svg b/public/images/line-icons/icon-key.svg new file mode 100644 index 00000000..c7456f17 --- /dev/null +++ b/public/images/line-icons/icon-key.svg @@ -0,0 +1,11 @@ + + + + + + From 5a8024fd420909d956d004384a54c9416a388ffc Mon Sep 17 00:00:00 2001 From: Lisa P Date: Thu, 3 Dec 2015 15:35:04 +0100 Subject: [PATCH 3/7] change settings icon on profile page --- app/styles/app/modules/icons.sass | 16 ++++++++++------ app/templates/components/hooks-list-item.hbs | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/styles/app/modules/icons.sass b/app/styles/app/modules/icons.sass index cea8b89a..64f91cad 100644 --- a/app/styles/app/modules/icons.sass +++ b/app/styles/app/modules/icons.sass @@ -9,12 +9,6 @@ height: 1em @extend %icon -.icon-cog, -.icon--cog - background-image: inline-image('svg/settings_gray.svg') - &:hover - background-image: inline-image('svg/settings_teal.svg') - .icon-api, .icon.api background-image: inline-image('svg/api-white.svg') @@ -150,6 +144,16 @@ %icon-line-cog-teal background-image: url('data:image/svg+xml;utf8,') +.icon-settings + @extend %icon-line-cog + width: 1em + height: 1em + background: + repeat: no-repeat + position: 0 0 + &:hover + @extend %icon-line-cog-teal + %icon-line-dropdown background-image: url('data:image/svg+xml;utf8,') %icon-line-dropdown-teal diff --git a/app/templates/components/hooks-list-item.hbs b/app/templates/components/hooks-list-item.hbs index 1e2df72e..a667ba34 100644 --- a/app/templates/components/hooks-list-item.hbs +++ b/app/templates/components/hooks-list-item.hbs @@ -3,7 +3,7 @@ {{#if hook.isSaving}} {{loading-indicator inline=true}} {{else}} - {{#link-to "settings" hook.ownerName hook.name class="profile-settings" title="Repository settings"}}{{/link-to}} + {{#link-to "settings" hook.ownerName hook.name class="profile-settings" title="Go to Travis CI repo settings"}}{{/link-to}} {{/if}} From 86a6cf5c057d1e17e640cf8b3eaa243082cd5a2e Mon Sep 17 00:00:00 2001 From: Lisa P Date: Thu, 3 Dec 2015 15:50:01 +0100 Subject: [PATCH 4/7] refactor some icons --- app/styles/app/modules/icons.sass | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/app/styles/app/modules/icons.sass b/app/styles/app/modules/icons.sass index 64f91cad..cd1fd75c 100644 --- a/app/styles/app/modules/icons.sass +++ b/app/styles/app/modules/icons.sass @@ -9,18 +9,6 @@ height: 1em @extend %icon -.icon-api, -.icon.api - background-image: inline-image('svg/api-white.svg') -.icon--grey.api - background-image: inline-image('svg/api-light-grey.svg') - -.icon--cancel - background-image: inline-image('svg/off.svg') - -.icon-sync - background-image: inline-image('icons/sync-account-icon.svg') - %icon-download-log background-image: url('data:image/svg+xml;utf8,') %icon-remove-log @@ -46,7 +34,6 @@ %icon-hook-off background-image: inline-image('svg/hooks-off.svg') - %icon-line-trashcan background-image: url('data:image/svg+xml;utf8,') %icon-line-trashcan-red @@ -70,6 +57,7 @@ height: 1.3em background-position: 0 6px margin-right: .3em + %icon-line-fingerprint background-image: url('data:image/svg+xml;utf8,') .icon-fingerprint @@ -80,10 +68,12 @@ margin-right: .3em %icon-line-calendar - background-image: inline-image('line-icons/icon-cal.svg') -.icon-line-cal + background-image: url('data:image/svg+xml;utf8,') +.icon-line-calendar, +.icon-cal, +.icon-calendar @extend %icon - @extend %icon-line-calendar + @extend %icon-line-fingre %icon-line-clock background-image: url('data:image/svg+xml;utf8,') From 174e7b2bc171369fa774dd96b8aabfb366ce8b19 Mon Sep 17 00:00:00 2001 From: Lisa P Date: Thu, 3 Dec 2015 17:41:57 +0100 Subject: [PATCH 5/7] update docs and blog links to use https --- app/templates/footer.hbs | 10 +++++----- app/templates/top.hbs | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/templates/footer.hbs b/app/templates/footer.hbs index f22b10c1..b1dfb2f2 100644 --- a/app/templates/footer.hbs +++ b/app/templates/footer.hbs @@ -6,14 +6,14 @@ @@ -21,7 +21,7 @@