From 66b6b71ee788e45b390e70d576899f02aaf3a506 Mon Sep 17 00:00:00 2001 From: Sascha Eggenberger <seggenberger@gitlab.com> Date: Mon, 27 Nov 2023 13:31:15 +0100 Subject: [PATCH] Unify reply field Changelog: changed --- .../abuse_report/components/notes/abuse_report_add_note.vue | 4 ++-- .../work_items/components/notes/work_item_add_note.vue | 4 ++-- app/assets/stylesheets/pages/note_form.scss | 1 - app/helpers/notes_helper.rb | 2 +- .../vulnerabilities/components/history_comment.vue | 2 +- locale/gitlab.pot | 3 --- .../components/notes/abuse_report_add_note_spec.js | 2 +- 7 files changed, 7 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/admin/abuse_report/components/notes/abuse_report_add_note.vue b/app/assets/javascripts/admin/abuse_report/components/notes/abuse_report_add_note.vue index 3c709fc565fd3..68cd6fc706e09 100644 --- a/app/assets/javascripts/admin/abuse_report/components/notes/abuse_report_add_note.vue +++ b/app/assets/javascripts/admin/abuse_report/components/notes/abuse_report_add_note.vue @@ -8,7 +8,7 @@ import AbuseReportCommentForm from './abuse_report_comment_form.vue'; export default { name: 'AbuseReportAddNote', i18n: { - reply: __('Reply'), + reply: __('Reply…'), replyToComment: __('Reply to comment'), commentError: __('Your comment could not be submitted because %{reason}.'), genericError: __( @@ -124,7 +124,7 @@ export default { v-else ref="textarea" rows="1" - class="reply-placeholder-text-field gl-font-regular!" + class="reply-placeholder-text-field" data-testid="abuse-report-note-reply-textarea" :placeholder="$options.i18n.reply" :aria-label="$options.i18n.replyToComment" diff --git a/app/assets/javascripts/work_items/components/notes/work_item_add_note.vue b/app/assets/javascripts/work_items/components/notes/work_item_add_note.vue index c3b7b7a2953f6..3636f222c2df4 100644 --- a/app/assets/javascripts/work_items/components/notes/work_item_add_note.vue +++ b/app/assets/javascripts/work_items/components/notes/work_item_add_note.vue @@ -287,9 +287,9 @@ export default { v-else ref="textarea" rows="1" - class="reply-placeholder-text-field gl-font-regular!" + class="reply-placeholder-text-field" data-testid="note-reply-textarea" - :placeholder="__('Reply')" + :placeholder="__('Reply…')" :aria-label="__('Reply to comment')" @focus="showReplyForm" @click="showReplyForm" diff --git a/app/assets/stylesheets/pages/note_form.scss b/app/assets/stylesheets/pages/note_form.scss index e5808c71a6d69..5d644d636660a 100644 --- a/app/assets/stylesheets/pages/note_form.scss +++ b/app/assets/stylesheets/pages/note_form.scss @@ -326,7 +326,6 @@ table { .discussion-reply-holder { .reply-placeholder-text-field { - @include gl-font-monospace; border-radius: $gl-border-radius-base; width: 100%; resize: none; diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index aad3e07ea2835..e67e6c22e1ae9 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -65,7 +65,7 @@ def link_to_reply_discussion(discussion, line_type = nil) content_tag( :textarea, rows: 1, - placeholder: _('Reply...'), + placeholder: _('Reply…'), 'aria-label': _('Reply to comment'), class: 'reply-placeholder-text-field js-discussion-reply-button', data: { diff --git a/ee/app/assets/javascripts/vulnerabilities/components/history_comment.vue b/ee/app/assets/javascripts/vulnerabilities/components/history_comment.vue index 7c84d82e11551..d075ed7849216 100644 --- a/ee/app/assets/javascripts/vulnerabilities/components/history_comment.vue +++ b/ee/app/assets/javascripts/vulnerabilities/components/history_comment.vue @@ -228,7 +228,7 @@ export default { <textarea rows="1" :placeholder="s__('vulnerability|Add a comment')" - class="reply-placeholder-text-field gl-font-regular!" + class="reply-placeholder-text-field" data-testid="add-comment-textarea" @focus="showCommentInput" ></textarea> diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 6ad032d15b15a..c563e837d504f 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -40218,9 +40218,6 @@ msgstr "" msgid "Reply to this email directly or %{view_it_on_gitlab}." msgstr "" -msgid "Reply..." -msgstr "" - msgid "Reply…" msgstr "" diff --git a/spec/frontend/admin/abuse_report/components/notes/abuse_report_add_note_spec.js b/spec/frontend/admin/abuse_report/components/notes/abuse_report_add_note_spec.js index dd9dcf304ae9a..f9d8ad93834f2 100644 --- a/spec/frontend/admin/abuse_report/components/notes/abuse_report_add_note_spec.js +++ b/spec/frontend/admin/abuse_report/components/notes/abuse_report_add_note_spec.js @@ -115,7 +115,7 @@ describe('Abuse Report Add Note', () => { expect(findReplyTextarea().exists()).toBe(true); expect(findReplyTextarea().attributes()).toMatchObject({ rows: '1', - placeholder: 'Reply', + placeholder: 'Reply…', 'aria-label': 'Reply to comment', }); }); -- GitLab