summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2019-04-02 20:23:24 +0000
committerClement Ho <clemmakesapps@gmail.com>2019-04-02 20:23:24 +0000
commit17c1b20f9d4237555d6fcd45c2b3fa151a94521c (patch)
tree6cdb7381231b45874e140d64cf337a7db1f29289
parent5570ce7dde55f477e463aab6d9a0de0836816279 (diff)
parent2378dde2e2fa0de41f4f578e56209dc96b5a82c1 (diff)
downloadgitlab-ce-17c1b20f9d4237555d6fcd45c2b3fa151a94521c.tar.gz
Merge branch '55980-remove-add-issue-on-blank-list' into 'master'
Remove non-functional add issue button on welcome list Closes #55980 See merge request gitlab-org/gitlab-ce!26742
-rw-r--r--app/assets/javascripts/boards/components/board.js5
-rw-r--r--app/assets/stylesheets/pages/boards.scss2
-rw-r--r--changelogs/unreleased/55980-remove-add-issue-on-blank-list.yml5
-rw-r--r--spec/javascripts/boards/components/board_spec.js14
4 files changed, 24 insertions, 2 deletions
diff --git a/app/assets/javascripts/boards/components/board.js b/app/assets/javascripts/boards/components/board.js
index fb6e5291a61..45b9e57f9ab 100644
--- a/app/assets/javascripts/boards/components/board.js
+++ b/app/assets/javascripts/boards/components/board.js
@@ -54,7 +54,10 @@ export default Vue.extend({
return `${n__('%d issue', '%d issues', issuesSize)}`;
},
isNewIssueShown() {
- return this.list.type === 'backlog' || (!this.disabled && this.list.type !== 'closed');
+ return (
+ this.list.type === 'backlog' ||
+ (!this.disabled && this.list.type !== 'closed' && this.list.type !== 'blank')
+ );
},
},
watch: {
diff --git a/app/assets/stylesheets/pages/boards.scss b/app/assets/stylesheets/pages/boards.scss
index ed0e9db035b..fc1c1bd9962 100644
--- a/app/assets/stylesheets/pages/boards.scss
+++ b/app/assets/stylesheets/pages/boards.scss
@@ -234,7 +234,7 @@
}
.board-title-text {
- margin-right: auto;
+ margin: $gl-vert-padding auto $gl-vert-padding 0;
}
.board-delete {
diff --git a/changelogs/unreleased/55980-remove-add-issue-on-blank-list.yml b/changelogs/unreleased/55980-remove-add-issue-on-blank-list.yml
new file mode 100644
index 00000000000..4c16b635297
--- /dev/null
+++ b/changelogs/unreleased/55980-remove-add-issue-on-blank-list.yml
@@ -0,0 +1,5 @@
+---
+title: Remove non-functional add issue button on welcome list
+merge_request: !26742
+author:
+type: fixed
diff --git a/spec/javascripts/boards/components/board_spec.js b/spec/javascripts/boards/components/board_spec.js
index 6e6b3e6950b..d08ee41802b 100644
--- a/spec/javascripts/boards/components/board_spec.js
+++ b/spec/javascripts/boards/components/board_spec.js
@@ -103,4 +103,18 @@ describe('Board component', () => {
})
.catch(done.fail);
});
+
+ it('does render add issue button', () => {
+ expect(vm.$el.querySelector('.issue-count-badge-add-button')).not.toBeNull();
+ });
+
+ it('does not render add issue button when list type is blank', done => {
+ vm.list.type = 'blank';
+
+ Vue.nextTick(() => {
+ expect(vm.$el.querySelector('.issue-count-badge-add-button')).toBeNull();
+
+ done();
+ });
+ });
});