Comment box/Placeholder text redo
This commit is contained in:
parent
6288677134
commit
c611b6f623
|
@ -118,7 +118,7 @@ module GitlabMarkdownHelper
|
|||
|
||||
# Returns a random markdown tip for use as a textarea placeholder
|
||||
def random_markdown_tip
|
||||
"Tip: #{MARKDOWN_TIPS.sample}"
|
||||
"#{MARKDOWN_TIPS.sample}"
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
%input#zen-toggle-comment.zen-toggle-comment{ tabindex: '-1', type: 'checkbox' }
|
||||
.zen-backdrop
|
||||
- classes << ' js-gfm-input markdown-area'
|
||||
= f.text_area attr, class: classes, placeholder: random_markdown_tip
|
||||
= f.text_area attr, class: classes, placeholder: ''
|
||||
= link_to nil, class: 'zen-enter-link', tabindex: '-1' do
|
||||
%i.fa.fa-expand
|
||||
Edit in fullscreen
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
= render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-task-list-field'
|
||||
|
||||
.comment-hints.clearfix
|
||||
.pull-left Comments are parsed with #{link_to 'GitLab Flavored Markdown', help_page_path('markdown', 'markdown'),{ target: '_blank', tabindex: -1 }}
|
||||
.pull-right Attach files by dragging & dropping or #{link_to 'selecting them', '#', class: 'markdown-selector', tabindex: -1 }.
|
||||
.pull-left #{link_to 'Markdown tip:', help_page_path('markdown', 'markdown'),{ target: '_blank', tabindex: -1 }}
|
||||
.pull-right #{link_to 'Attach a file', '#', class: 'markdown-selector', tabindex: -1 }
|
||||
|
||||
.note-form-actions
|
||||
.buttons
|
||||
|
|
|
@ -12,8 +12,13 @@
|
|||
classes: 'note_text js-note-text'
|
||||
|
||||
.comment-hints.clearfix
|
||||
.pull-left Comments are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 }}
|
||||
.pull-right Attach files by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector', tabindex: -1 }.
|
||||
.pull-left
|
||||
= link_to "Markdown tip:", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 }
|
||||
= random_markdown_tip
|
||||
.pull-right
|
||||
= link_to '#', class: 'markdown-selector', tabindex: -1 do
|
||||
Attach a file
|
||||
= icon('paperclip')
|
||||
.error-alert
|
||||
|
||||
.note-form-actions
|
||||
|
|
|
@ -137,7 +137,6 @@ describe GitlabMarkdownHelper do
|
|||
describe 'random_markdown_tip' do
|
||||
it 'returns a random Markdown tip' do
|
||||
stub_const("#{described_class}::MARKDOWN_TIPS", ['Random tip'])
|
||||
expect(random_markdown_tip).to eq 'Tip: Random tip'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue