Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-11-04 12:10:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-04 12:10:05 +0300
commit88741f7df96173e80dea5e67ea9946e766935849 (patch)
treedbe38ee8a5243766966cc4717f60891646fd7cfb
parent8fe2215fbc018a1d436c4a214594c9d3573c9ae1 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/deprecated_notes.js2
-rw-r--r--app/assets/javascripts/single_file_diff.js5
-rw-r--r--app/assets/stylesheets/framework/buttons.scss19
-rw-r--r--app/helpers/notes_helper.rb24
-rw-r--r--app/views/projects/diffs/viewers/_collapsed.html.haml3
-rw-r--r--locale/gitlab.pot12
-rw-r--r--spec/features/projects/commit/comments/user_adds_comment_spec.rb2
7 files changed, 34 insertions, 33 deletions
diff --git a/app/assets/javascripts/deprecated_notes.js b/app/assets/javascripts/deprecated_notes.js
index 008e12abbcd..9b5b4cef1b9 100644
--- a/app/assets/javascripts/deprecated_notes.js
+++ b/app/assets/javascripts/deprecated_notes.js
@@ -152,7 +152,7 @@ export default class Notes {
// update the file name when an attachment is selected
this.$wrapperEl.on('change', '.js-note-attachment-input', this.updateFormAttachment);
// reply to diff/discussion notes
- this.$wrapperEl.on('click', '.js-discussion-reply-button', this.onReplyToDiscussionNote);
+ this.$wrapperEl.on('focus', '.js-discussion-reply-button', this.onReplyToDiscussionNote);
// add diff note
this.$wrapperEl.on('click', '.js-add-diff-note-button', this.onAddDiffNote);
// add diff note for images
diff --git a/app/assets/javascripts/single_file_diff.js b/app/assets/javascripts/single_file_diff.js
index 11896a75798..1e01da795e8 100644
--- a/app/assets/javascripts/single_file_diff.js
+++ b/app/assets/javascripts/single_file_diff.js
@@ -40,9 +40,12 @@ export default class SingleFileDiff {
this.$chevronDownIcon.removeClass('gl-display-none');
}
- $('.js-file-title, .click-to-expand', this.file).on('click', (e) => {
+ $('.js-file-title', this.file).on('click', (e) => {
this.toggleDiff($(e.target));
});
+ $('.click-to-expand', this.file).on('click', (e) => {
+ this.toggleDiff($(e.currentTarget));
+ });
}
toggleDiff($target, cb) {
diff --git a/app/assets/stylesheets/framework/buttons.scss b/app/assets/stylesheets/framework/buttons.scss
index 8a64b0999b6..88509dbc4a1 100644
--- a/app/assets/stylesheets/framework/buttons.scss
+++ b/app/assets/stylesheets/framework/buttons.scss
@@ -191,25 +191,6 @@
color: $gray-700;
}
- // deprecated class
- &.btn-text-field {
- width: 100%;
- text-align: left;
- padding: 6px 16px;
- border-color: $border-color;
- color: $gray-darkest;
- background-color: $white;
-
- &:hover,
- &:active,
- &:focus {
- cursor: text;
- box-shadow: none;
- border-color: lighten($blue-300, 20%);
- color: $gray-darkest;
- }
- }
-
&.dot-highlight::after {
content: '';
background-color: $blue-500;
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb
index af8da86b391..75e89a7d7bc 100644
--- a/app/helpers/notes_helper.rb
+++ b/app/helpers/notes_helper.rb
@@ -71,16 +71,20 @@ module NotesHelper
def link_to_reply_discussion(discussion, line_type = nil)
return unless current_user
- data = {
- discussion_id: discussion.reply_id,
- discussion_project_id: discussion.project&.id,
- line_type: line_type
- }
-
- button_tag 'Reply...',
- class: 'btn btn-text-field js-discussion-reply-button',
- data: data,
- title: 'Add a reply'
+ content_tag(
+ :textarea,
+ rows: 1,
+ placeholder: _('Reply...'),
+ 'aria-label': _('Reply to comment'),
+ class: 'reply-placeholder-text-field js-discussion-reply-button',
+ data: {
+ discussion_id: discussion.reply_id,
+ discussion_project_id: discussion.project&.id,
+ line_type: line_type
+ }
+ ) do
+ # render empty textarea
+ end
end
def note_max_access_for_user(note)
diff --git a/app/views/projects/diffs/viewers/_collapsed.html.haml b/app/views/projects/diffs/viewers/_collapsed.html.haml
index 578b0af3241..6cffae44084 100644
--- a/app/views/projects/diffs/viewers/_collapsed.html.haml
+++ b/app/views/projects/diffs/viewers/_collapsed.html.haml
@@ -1,3 +1,4 @@
.nothing-here-block.diff-collapsed{ data: { diff_for_path: collapsed_diff_url(viewer.diff_file) } }
= _("This diff is collapsed.")
- %button.click-to-expand.gl-button.btn.btn-link= _("Click to expand it.")
+ = render Pajamas::ButtonComponent.new(variant: :link, button_options: { class: 'click-to-expand' }) do
+ = _("Click to expand it.")
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 5b32b637b96..92b0cb58e9d 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -12370,6 +12370,9 @@ msgstr ""
msgid "ComplianceFrameworksReport|Default"
msgstr ""
+msgid "ComplianceFrameworksReport|Description"
+msgstr ""
+
msgid "ComplianceFrameworksReport|Edit framework"
msgstr ""
@@ -39935,6 +39938,9 @@ msgstr ""
msgid "Reply to this email directly or %{view_it_on_gitlab}."
msgstr ""
+msgid "Reply..."
+msgstr ""
+
msgid "Reply…"
msgstr ""
@@ -51395,6 +51401,9 @@ msgstr ""
msgid "UsageQuota|%{storage_limit_link_start}A namespace storage limit%{link_end} will soon be enforced for the %{strong_start}%{namespace_name}%{strong_end} namespace. %{extra_message}"
msgstr ""
+msgid "UsageQuota|Any additional purchased storage will be displayed here."
+msgstr ""
+
msgid "UsageQuota|Audio samples, videos, datasets, and graphics."
msgstr ""
@@ -51509,6 +51518,9 @@ msgstr ""
msgid "UsageQuota|Projects under this namespace have %{planLimit} of storage."
msgstr ""
+msgid "UsageQuota|Purchased storage"
+msgstr ""
+
msgid "UsageQuota|Recalculate repository usage"
msgstr ""
diff --git a/spec/features/projects/commit/comments/user_adds_comment_spec.rb b/spec/features/projects/commit/comments/user_adds_comment_spec.rb
index b0cb57f158d..d9225192f6b 100644
--- a/spec/features/projects/commit/comments/user_adds_comment_spec.rb
+++ b/spec/features/projects/commit/comments/user_adds_comment_spec.rb
@@ -112,7 +112,7 @@ RSpec.describe "User adds a comment on a commit", :js, feature_category: :source
click_button("Comment")
end
- expect(page).to have_button("Reply...").and have_no_css("form.new_note")
+ expect(page).to have_css(".reply-placeholder-text-field").and have_no_css("form.new_note")
end
# A comment should be added and visible.