Commit 07a9d44d authored by Ciro Santillli's avatar Ciro Santillli Committed by Ciro Santilli

Commit message textareas have 72 char mark line.

parent 9b52affe
......@@ -75,3 +75,26 @@ label {
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 @@
}
}
}
#modal-remove-blob > .modal-dialog { width: 850px; }
......@@ -14,7 +14,8 @@
= label_tag 'commit_message', class: "control-label" do
Commit message
.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
.col-sm-2
.col-sm-10
......
......@@ -19,7 +19,8 @@
= label_tag 'commit_message', class: "control-label" do
Commit message
.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
= hidden_field_tag 'last_commit', @last_commit
= hidden_field_tag 'content', '', id: "file-content"
......
......@@ -21,7 +21,6 @@
= link_to "click here", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
for instructions.
.js-toggle-container
%p
If you want to modify merge commit message -
......@@ -31,7 +30,8 @@
.form-group
= label_tag :merge_commit_message, "Commit message", class: 'control-label'
.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
The recommended maximum line length is 52 characters for the first line and 72 characters for all following lines.
......
......@@ -24,7 +24,8 @@
= label_tag 'commit_message', class: "control-label" do
Commit message
.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-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