diff options
author | Martin Wortschack <mwortschack@gitlab.com> | 2018-11-02 18:39:01 +0100 |
---|---|---|
committer | Martin Wortschack <mwortschack@gitlab.com> | 2018-11-02 18:39:01 +0100 |
commit | 400c28b6f9c450b3b0bd815211ba2cb0e16d69a7 (patch) | |
tree | dc5e9e7ce2bb95c008d24d3e65dde85d8737f182 | |
parent | 20848f4c9c045ec796d47dbd2c80a2a474fe13db (diff) | |
download | gitlab-ce-400c28b6f9c450b3b0bd815211ba2cb0e16d69a7.tar.gz |
Resolve FE discussions
-rw-r--r-- | app/assets/stylesheets/pages/events.scss | 18 | ||||
-rw-r--r-- | app/helpers/events_helper.rb | 6 | ||||
-rw-r--r-- | app/views/events/event/_common.html.haml | 10 | ||||
-rw-r--r-- | app/views/events/event/_created_project.html.haml | 2 | ||||
-rw-r--r-- | app/views/events/event/_note.html.haml | 4 | ||||
-rw-r--r-- | app/views/events/event/_push.html.haml | 4 |
6 files changed, 15 insertions, 29 deletions
diff --git a/app/assets/stylesheets/pages/events.scss b/app/assets/stylesheets/pages/events.scss index b122633e2cc..c161755df1c 100644 --- a/app/assets/stylesheets/pages/events.scss +++ b/app/assets/stylesheets/pages/events.scss @@ -8,6 +8,7 @@ border-bottom: 1px solid $white-normal; color: $gl-text-color-secondary; position: relative; + line-height: 16px; .system-note-image { position: absolute; @@ -47,7 +48,6 @@ } .event-user-info { - line-height: 16px; margin-bottom: $gl-padding-8; .author_name { @@ -59,25 +59,14 @@ } .event-title { - line-height: 16px; - .event-type { &::first-letter { text-transform: capitalize; } } - - .event-type, - .ref-name, - .event-target-type, - .event-target-link, - .event-target-title { - margin-right: $gl-padding-4; - } } .event-body { - line-height: 16px; margin-top: $gl-padding-8; margin-right: 174px; color: $gl-text-color; @@ -125,7 +114,6 @@ color: $gl-gray-500; float: left; font-size: $gl-font-size; - line-height: 16px; margin-right: 5px; } } @@ -174,7 +162,6 @@ .event-item-timestamp { float: right; - line-height: 16px; } .ref-name, @@ -212,8 +199,7 @@ max-width: 100%; } - .system-note-image, - .system-note-image-inline { + .system-note-image { display: none; } diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 71938b417b1..c77a41cfbc3 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -165,11 +165,11 @@ module EventsHelper if event.note_target output = [] - output << content_tag(:span, class: "event-target-type") do + output << content_tag(:span, class: "event-target-type append-right-4") do "#{event.note_target_type}" end - output << link_to(event.note_target_reference, event_note_target_url(event), title: event.target_title, class: 'has-tooltip event-target-link') + output << link_to(event.note_target_reference, event_note_target_url(event), title: event.target_title, class: 'has-tooltip event-target-link append-right-4') output.join.html_safe else @@ -203,7 +203,7 @@ module EventsHelper def inline_event_icon(event) unless current_path?('users#show') - content_tag :span, class: "system-note-image-inline d-flex append-right-4 #{event.action_name.parameterize}-icon" do + content_tag :span, class: "system-note-image-inline d-none d-sm-flex append-right-4 #{event.action_name.parameterize}-icon" do icon_for_event(event.action_name, size: 14) end end diff --git a/app/views/events/event/_common.html.haml b/app/views/events/event/_common.html.haml index 480475a598a..4a8b73840a3 100644 --- a/app/views/events/event/_common.html.haml +++ b/app/views/events/event/_common.html.haml @@ -5,15 +5,15 @@ .event-title.d-flex.flex-wrap.align-items-center = inline_event_icon(event) - if event.target - %span.event-type.d-inline-block{ class: event.action_name } + %span.event-type.d-inline-block.append-right-4{ class: event.action_name } = event.action_name - %span.event-target-type= event.target_type.titleize.downcase - = link_to [event.project.namespace.becomes(Namespace), event.project, event.target], class: 'has-tooltip event-target-link', title: event.target_title do + %span.event-target-type.append-right-4= event.target_type.titleize.downcase + = link_to [event.project.namespace.becomes(Namespace), event.project, event.target], class: 'has-tooltip event-target-link append-right-4', title: event.target_title do = event.target.reference_link_text - unless event.milestone? - %span.event-target-title= ""#{event.target.title}"".html_safe + %span.event-target-title.append-right-4= ""#{event.target.title}"".html_safe - else - %span.event-type.d-inline-block{ class: event.action_name } + %span.event-type.d-inline-block.append-right-4{ class: event.action_name } = event_action_name(event) = render "events/event_scope", event: event diff --git a/app/views/events/event/_created_project.html.haml b/app/views/events/event/_created_project.html.haml index a388935d217..3f1a9ceda6f 100644 --- a/app/views/events/event/_created_project.html.haml +++ b/app/views/events/event/_created_project.html.haml @@ -4,7 +4,7 @@ .event-title.d-flex.flex-wrap.align-items-center = inline_event_icon(event) - %span.event-type.d-inline-block{ class: event.action_name } + %span.event-type.d-inline-block.append-right-4{ class: event.action_name } = event_action_name(event) - if event.project diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml index 5ac2ef9dbfc..569de6c8c95 100644 --- a/app/views/events/event/_note.html.haml +++ b/app/views/events/event/_note.html.haml @@ -4,10 +4,10 @@ .event-title.d-flex.flex-wrap.align-items-center = inline_event_icon(event) - %span.event-type.d-inline-block{ class: event.action_name } + %span.event-type.d-inline-block.append-right-4{ class: event.action_name } = event.action_name = event_note_title_html(event) - %span.event-target-title= ""#{event.target.title}"".html_safe + %span.event-target-title.append-right-4= ""#{event.target.title}"".html_safe = render "events/event_scope", event: event diff --git a/app/views/events/event/_push.html.haml b/app/views/events/event/_push.html.haml index 1c91074184a..131a142a3a5 100644 --- a/app/views/events/event/_push.html.haml +++ b/app/views/events/event/_push.html.haml @@ -6,11 +6,11 @@ .event-title.d-flex.flex-wrap.align-items-center = inline_event_icon(event) - %span.event-type.d-inline-block.pushed #{event.action_name} #{event.ref_type} + %span.event-type.d-inline-block.append-right-4.pushed #{event.action_name} #{event.ref_type} %span - commits_link = project_commits_path(project, event.ref_name) - should_link = event.tag? ? project.repository.tag_exists?(event.ref_name) : project.repository.branch_exists?(event.ref_name) - = link_to_if should_link, event.ref_name, commits_link, class: 'ref-name' + = link_to_if should_link, event.ref_name, commits_link, class: 'ref-name append-right-4' = render "events/event_scope", event: event |