summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnabel Gray <annabel.m.gray@gmail.com>2018-07-02 17:31:08 +0000
committerAnnabel Gray <annabel.m.gray@gmail.com>2018-07-02 17:31:08 +0000
commit80e671aea30754d663c2a1ae480ab771b681ca04 (patch)
tree1e3d4c26fae9d645e37939b50f8b4652191d6513
parent9ce5b098801c9a06ca4352bc0cfb8fc921b45c61 (diff)
parent5870d5e4d481ed1a129d8b35c96b912b809da9d1 (diff)
downloadgitlab-ce-80e671aea30754d663c2a1ae480ab771b681ca04.tar.gz
Merge branch 'add-title-placeholder-for-new-issues' into 'master'
Add title placeholder for new issues Closes #48085 See merge request gitlab-org/gitlab-ce!20271
-rw-r--r--app/views/shared/issuable/form/_title.html.haml2
-rw-r--r--changelogs/unreleased/add-title-placeholder-for-new-issues.yml5
-rw-r--r--spec/features/projects/issues/user_creates_issue_spec.rb3
3 files changed, 9 insertions, 1 deletions
diff --git a/app/views/shared/issuable/form/_title.html.haml b/app/views/shared/issuable/form/_title.html.haml
index c35d0b3751f..e49bdec386a 100644
--- a/app/views/shared/issuable/form/_title.html.haml
+++ b/app/views/shared/issuable/form/_title.html.haml
@@ -6,7 +6,7 @@
%div{ class: div_class }
= form.text_field :title, required: true, maxlength: 255, autofocus: true,
- autocomplete: 'off', class: 'form-control pad qa-issuable-form-title'
+ autocomplete: 'off', class: 'form-control pad qa-issuable-form-title', placeholder: _('Title')
- if issuable.respond_to?(:work_in_progress?)
%p.form-text.text-muted
diff --git a/changelogs/unreleased/add-title-placeholder-for-new-issues.yml b/changelogs/unreleased/add-title-placeholder-for-new-issues.yml
new file mode 100644
index 00000000000..ce9e3b4ac18
--- /dev/null
+++ b/changelogs/unreleased/add-title-placeholder-for-new-issues.yml
@@ -0,0 +1,5 @@
+---
+title: Add title placeholder for new issues
+merge_request: 20271
+author: George Tsiolis
+type: changed
diff --git a/spec/features/projects/issues/user_creates_issue_spec.rb b/spec/features/projects/issues/user_creates_issue_spec.rb
index e76f7c5589d..5e8662100c5 100644
--- a/spec/features/projects/issues/user_creates_issue_spec.rb
+++ b/spec/features/projects/issues/user_creates_issue_spec.rb
@@ -17,6 +17,9 @@ describe "User creates issue" do
expect(page).to have_no_content("Assign to")
.and have_no_content("Labels")
.and have_no_content("Milestone")
+
+ expect(page.find('#issue_title')['placeholder']).to eq 'Title'
+ expect(page.find('#issue_description')['placeholder']).to eq 'Write a comment or drag your files hereā€¦'
end
issue_title = "500 error on profile"