Commit df55d35f authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'widget-widget-widget-fun' into 'master'

Merge request widget merged state styling

See merge request !9352
parents 9e4d7630 965d96bc
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
* *
*/ */
.mr-state-widget { .mr-state-widget {
background: $gray-light;
color: $gl-text-color; color: $gl-text-color;
border: 1px solid $border-color; border: 1px solid $border-color;
border-radius: 2px; border-radius: 2px;
...@@ -109,12 +108,17 @@ ...@@ -109,12 +108,17 @@
@media (max-width: $screen-xs-max) { @media (max-width: $screen-xs-max) {
flex-wrap: wrap; flex-wrap: wrap;
} }
.ci-status-icon > .icon-link > svg {
width: 22px;
height: 22px;
}
} }
.mr-widget-body, .mr-widget-body,
.ci_widget, .ci_widget,
.mr-widget-footer { .mr-widget-footer {
padding: $gl-padding; padding: 16px;
} }
.mr-widget-pipeline-graph { .mr-widget-pipeline-graph {
...@@ -174,10 +178,6 @@ ...@@ -174,10 +178,6 @@
} }
} }
p:last-child {
margin-bottom: 0;
}
.btn-grouped { .btn-grouped {
margin-left: 0; margin-left: 0;
margin-right: 7px; margin-right: 7px;
...@@ -340,8 +340,61 @@ ...@@ -340,8 +340,61 @@
} }
} }
.remove-message-pipes {
ul {
margin: 10px 0 0 12px;
padding: 0;
list-style: none;
border-left: 2px solid $border-color;
display: inline-block;
}
li {
position: relative;
margin: 0;
padding: 0;
display: block;
span {
margin-left: 15px;
max-height: 20px;
}
}
li::before {
content: '';
position: absolute;
border-top: 2px solid $border-color;
height: 1px;
top: 8px;
width: 8px;
}
li:last-child {
&::before {
top: 18px;
}
span {
display: block;
position: relative;
top: 5px;
margin-top: 5px;
}
}
}
.mr-source-target { .mr-source-target {
background-color: $gray-light;
line-height: 31px; line-height: 31px;
border-style: solid;
border-width: 1px;
border-color: $border-color;
border-top-right-radius: 3px;
border-top-left-radius: 3px;
border-bottom: none;
padding: 16px;
margin-bottom: -1px;
} }
.panel-new-merge-request { .panel-new-merge-request {
...@@ -437,6 +490,8 @@ ...@@ -437,6 +490,8 @@
} }
.merged-buttons { .merged-buttons {
margin-top: 20px;
.btn { .btn {
float: left; float: left;
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
%li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch) %li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch)
%li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff) %li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff)
.normal .normal
%span Request to merge %span <b>Request to merge</b>
%span.label-branch= source_branch_with_namespace(@merge_request) %span.label-branch= source_branch_with_namespace(@merge_request)
%span into %span <b>into</b>
%span.label-branch %span.label-branch
= link_to_if @merge_request.target_branch_exists?, @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch) = link_to_if @merge_request.target_branch_exists?, @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch)
- if @merge_request.open? && @merge_request.diverged_from_target_branch? - if @merge_request.open? && @merge_request.diverged_from_target_branch?
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.mr-widget-heading .mr-widget-heading
- %w[success success_with_warnings skipped canceled failed running pending].each do |status| - %w[success success_with_warnings skipped canceled failed running pending].each do |status|
.ci_widget{ class: "ci-#{status}", style: ("display:none" unless @pipeline.status == status) } .ci_widget{ class: "ci-#{status}", style: ("display:none" unless @pipeline.status == status) }
%div{ class: "ci-status-icon-#{status}" } %div{ class: "ci-status-icon ci-status-icon-#{status}" }
= link_to namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), class: 'icon-link' do = link_to namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), class: 'icon-link' do
= ci_icon_for_status(status) = ci_icon_for_status(status)
%span %span
......
...@@ -7,28 +7,46 @@ ...@@ -7,28 +7,46 @@
by #{link_to_member(@project, @merge_request.merge_event.author, avatar: true)} by #{link_to_member(@project, @merge_request.merge_event.author, avatar: true)}
#{time_ago_with_tooltip(@merge_request.merge_event.created_at)} #{time_ago_with_tooltip(@merge_request.merge_event.created_at)}
- if !@merge_request.source_branch_exists? || params[:deleted_source_branch] - if !@merge_request.source_branch_exists? || params[:deleted_source_branch]
%p .remove-message-pipes
The changes were merged into %ul
#{link_to @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch), class: "label-branch"}. %li
The source branch has been removed. %span
The changes were merged into
#{link_to @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch), class: "label-branch"}.
%li
%span
The source branch has been removed.
= render 'projects/merge_requests/widget/merged_buttons' = render 'projects/merge_requests/widget/merged_buttons'
- elsif @merge_request.can_remove_source_branch?(current_user) - elsif @merge_request.can_remove_source_branch?(current_user)
.remove_source_branch_widget .remove_source_branch_widget.remove-message-pipes
%p %ul
The changes were merged into %li
#{link_to @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch), class: "label-branch"}. %span
You can remove the source branch now. The changes were merged into
#{link_to @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch), class: "label-branch"}.
%li
%span
You can remove the source branch now.
= render 'projects/merge_requests/widget/merged_buttons', source_branch_exists: true = render 'projects/merge_requests/widget/merged_buttons', source_branch_exists: true
.remove_source_branch_widget.failed.hide .remove_source_branch_widget.failed.remove-message-pipes.hide
%p %ul
Failed to remove source branch '#{@merge_request.source_branch}'. %li
%span
.remove_source_branch_in_progress.hide Failed to remove source branch '#{@merge_request.source_branch}'.
%p .remove_source_branch_in_progress.remove-message-pipes.hide
= icon('spinner spin') %ul
Removing source branch '#{@merge_request.source_branch}'. Please wait, this page will be automatically reloaded. %li
%span
= icon('spinner spin')
Removing source branch '#{@merge_request.source_branch}'.
%li
%span
Please wait, this page will be automatically reloaded.
- else - else
%p .remove-message-pipes
The changes were merged into %ul
#{link_to @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch), class: "label-branch"}. %li
= render 'projects/merge_requests/widget/merged_buttons' %span
The changes were merged into
#{link_to @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch), class: "label-branch"}.
= render 'projects/merge_requests/widget/merged_buttons'
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
= icon('trash-o') = icon('trash-o')
Remove Source Branch Remove Source Branch
- if mr_can_be_reverted - if mr_can_be_reverted
= revert_commit_link(@merge_request.merge_commit, namespace_project_merge_request_path(@project.namespace, @project, @merge_request), btn_class: "warning") = revert_commit_link(@merge_request.merge_commit, namespace_project_merge_request_path(@project.namespace, @project, @merge_request), btn_class: "close")
- if mr_can_be_cherry_picked - if mr_can_be_cherry_picked
= cherry_pick_commit_link(@merge_request.merge_commit, namespace_project_merge_request_path(@project.namespace, @project, @merge_request), btn_class: "default") = cherry_pick_commit_link(@merge_request.merge_commit, namespace_project_merge_request_path(@project.namespace, @project, @merge_request), btn_class: "default")
...@@ -3,20 +3,24 @@ ...@@ -3,20 +3,24 @@
- can_merge = @merge_request.can_be_merged_via_command_line_by?(current_user) - can_merge = @merge_request.can_be_merged_via_command_line_by?(current_user)
%h4.has-conflicts %h4.has-conflicts
= icon("exclamation-triangle") %p
This merge request contains merge conflicts = icon("exclamation-triangle")
This merge request contains merge conflicts
%p .remove-message-pipes
To merge this request, resolve these conflicts %ul
- if can_resolve && !can_resolve_in_ui %li
locally %span
or To merge this request, resolve these conflicts
- unless can_merge - if can_resolve && !can_resolve_in_ui
ask someone with write access to this repository to locally
merge it locally. or
- unless can_merge
ask someone with write access to this repository to
merge it locally.
- if (can_resolve && can_resolve_in_ui) || can_merge - if (can_resolve && can_resolve_in_ui) || can_merge
.btn-group .merged-buttons.clearfix
- if can_resolve && can_resolve_in_ui - if can_resolve && can_resolve_in_ui
= link_to "Resolve conflicts", conflicts_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: "btn" = link_to "Resolve conflicts", conflicts_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: "btn"
- if can_merge - if can_merge
......
...@@ -4,15 +4,20 @@ ...@@ -4,15 +4,20 @@
%h4 %h4
Set by #{link_to_member(@project, @merge_request.merge_user, avatar: true)} Set by #{link_to_member(@project, @merge_request.merge_user, avatar: true)}
to be merged automatically when the pipeline succeeds. to be merged automatically when the pipeline succeeds.
%div .remove-message-pipes
%p %ul
= succeed '.' do %li
The changes will be merged into %span
%span.label-branch= @merge_request.target_branch = succeed '.' do
- if @merge_request.remove_source_branch? The changes will be merged into #{link_to @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch), class: "label-branch"}
The source branch will be removed. - if @merge_request.remove_source_branch?
- else %li
The source branch will not be removed. %span
The source branch will be removed.
- else
%li
%span
The source branch will not be removed.
- remove_source_branch_button = !@merge_request.remove_source_branch? && @merge_request.can_remove_source_branch?(current_user) && @merge_request.merge_user == current_user - remove_source_branch_button = !@merge_request.remove_source_branch? && @merge_request.can_remove_source_branch?(current_user) && @merge_request.merge_user == current_user
- user_can_cancel_automatic_merge = @merge_request.can_cancel_merge_when_pipeline_succeeds?(current_user) - user_can_cancel_automatic_merge = @merge_request.can_cancel_merge_when_pipeline_succeeds?(current_user)
......
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