Commit 0401e195 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #6385 from cirosantilli/72-char-commit-msg

Commit message textareas have 72 char mark line.
parents 0fd12a78 07a9d44d
...@@ -75,3 +75,26 @@ label { ...@@ -75,3 +75,26 @@ label {
width: 200px; width: 200px;
} }
} }
.commit-message-container {
background-color: $body-bg;
position: relative;
font-family: $monospace_font;
$left: 12px;
.max-width-marker {
color: rgba(0, 0, 0, 0.0);
font-family: inherit;
left: $left;
height: 100%;
border-right: 1px solid mix($input-border, white);
position: absolute;
z-index: 1;
}
> textarea {
background-color: rgba(0, 0, 0, 0.0);
font-family: inherit;
padding-left: $left;
position: relative;
z-index: 2;
}
}
...@@ -151,3 +151,5 @@ ...@@ -151,3 +151,5 @@
} }
} }
} }
#modal-remove-blob > .modal-dialog { width: 850px; }
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
= label_tag 'commit_message', class: "control-label" do = label_tag 'commit_message', class: "control-label" do
Commit message Commit message
.col-sm-10 .col-sm-10
= text_area_tag 'commit_message', params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3, class: 'form-control' = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message',
params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3, class: 'form-control')}
.form-group .form-group
.col-sm-2 .col-sm-2
.col-sm-10 .col-sm-10
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
= label_tag 'commit_message', class: "control-label" do = label_tag 'commit_message', class: "control-label" do
Commit message Commit message
.col-sm-10 .col-sm-10
= text_area_tag 'commit_message', '', placeholder: "Update #{@blob.name}", required: true, rows: 3, class: 'form-control' = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message', '',
placeholder: "Update #{@blob.name}", required: true, rows: 3, class: 'form-control')}
.form-actions .form-actions
= hidden_field_tag 'last_commit', @last_commit = hidden_field_tag 'last_commit', @last_commit
= hidden_field_tag 'content', '', id: "file-content" = hidden_field_tag 'content', '', id: "file-content"
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
= link_to "click here", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal" = link_to "click here", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
for instructions. for instructions.
.js-toggle-container .js-toggle-container
%p %p
If you want to modify merge commit message - If you want to modify merge commit message -
...@@ -31,7 +30,8 @@ ...@@ -31,7 +30,8 @@
.form-group .form-group
= label_tag :merge_commit_message, "Commit message", class: 'control-label' = label_tag :merge_commit_message, "Commit message", class: 'control-label'
.col-sm-10 .col-sm-10
= text_area_tag :merge_commit_message, @merge_request.merge_commit_message, class: "form-control js-gfm-input", rows: 14, required: true = render 'shared/commit_message_container', {textarea: text_area_tag(:merge_commit_message,
@merge_request.merge_commit_message, class: "form-control js-gfm-input", rows: 14, required: true)}
%p.hint %p.hint
The recommended maximum line length is 52 characters for the first line and 72 characters for all following lines. The recommended maximum line length is 52 characters for the first line and 72 characters for all following lines.
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
= label_tag 'commit_message', class: "control-label" do = label_tag 'commit_message', class: "control-label" do
Commit message Commit message
.col-sm-10 .col-sm-10
= text_area_tag 'commit_message', params[:commit_message], placeholder: "Added new file", required: true, rows: 3, class: 'form-control' = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message',
params[:commit_message], placeholder: "Added new file", required: true, rows: 3, class: 'form-control')}
.file-holder .file-holder
.file-title .file-title
......
.commit-message-container
.max-width-marker
-# When the `ch` CSS length unit becomes widely supported `http://www.quirksmode.org/css/units-values` remove this workaround.
= 'a' * 72
= textarea
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment