Commit ad0f5fdc authored by Drew Blessing's avatar Drew Blessing

Improve mobile UI for issues and merge requests

parent 172ad962
...@@ -8,6 +8,7 @@ v 6.9.0 ...@@ -8,6 +8,7 @@ v 6.9.0
- Fix syntax highlighting for code comments blocks - Fix syntax highlighting for code comments blocks
- Improve comments loading logic - Improve comments loading logic
- Stop refreshing comments when the tab is hidden - Stop refreshing comments when the tab is hidden
- Improve issue and merge request mobile UI (Drew Blessing)
v 6.8.0 v 6.8.0
- Ability to at mention users that are participating in issue and merge req. discussion - Ability to at mention users that are participating in issue and merge req. discussion
......
...@@ -70,7 +70,6 @@ ...@@ -70,7 +70,6 @@
} }
.state { .state {
height: 34px;
border-bottom: 1px solid #DDD; border-bottom: 1px solid #DDD;
line-height: 32px; line-height: 32px;
} }
...@@ -89,6 +88,18 @@ ...@@ -89,6 +88,18 @@
border: none; border: none;
border-top: 1px solid #eee; border-top: 1px solid #eee;
padding: 15px 25px; padding: 15px 25px;
// Reset text align for children
.text-right > * { text-align: left; }
@media (max-width: $screen-xs-max) {
// Don't right align on mobile
.text-right { text-align: left; }
.row .col-md-6 {
padding-top: 5px;
}
}
} }
.description { .description {
...@@ -106,7 +117,11 @@ ...@@ -106,7 +117,11 @@
padding: 1px 25px; padding: 1px 25px;
text-align: center; text-align: center;
text-shadow: none; text-shadow: none;
margin-right: 20px;
display: inline-block; display: inline-block;
line-height: 34px;
}
.creator {
padding: 2px 15px;
} }
} }
...@@ -143,3 +143,36 @@ form.edit-issue { ...@@ -143,3 +143,36 @@ form.edit-issue {
border-color: #E5E5E5; border-color: #E5E5E5;
} }
} }
@media (max-width: $screen-xs-max) {
.issue-btn-group {
width: 100%;
margin-top: 5px;
.btn-group {
width: 100%;
ul {
width: 100%;
text-align: center;
}
}
.btn {
width: 100%;
margin-top: -1px;
&:first-child:not(:last-child) {
border-radius: 4px 4px 0 0;
}
&:not(:first-child):not(:last-child) {
border-radius: 0;
}
&:last-child:not(:first-child) {
border-radius: 0 0 4px 4px;
}
}
}
}
...@@ -40,4 +40,10 @@ ...@@ -40,4 +40,10 @@
.votes-holder { .votes-holder {
float: right; float: right;
width: 250px; width: 250px;
@media (max-width: $screen-xs-max) {
width: 100%;
margin-top: 5px;
margin-bottom: 10px;
}
} }
= form_for [@project, @issue], remote: true, html: {class: 'edit-issue inline-update'} do |f| = form_for [@project, @issue], remote: true, html: {class: 'edit-issue inline-update'} do |f|
.row
.col-md-6
%strong.append-right-10 %strong.append-right-10
Assignee: Assignee:
...@@ -9,11 +11,11 @@ ...@@ -9,11 +11,11 @@
- else - else
None None
.pull-right .col-md-6.text-right
%strong.append-right-10 %strong.append-right-10
Milestone: Milestone:
- if can?(current_user, :modify_issue, @issue) - if can?(current_user, :modify_issue, @issue)
= f.select(:milestone_id, milestone_options(@issue), { include_blank: "Select milestone (none):" }, {class: 'select2 select2-compact'}) = f.select(:milestone_id, milestone_options(@issue), { include_blank: "Select milestone" }, {class: 'select2 select2-compact'})
= hidden_field_tag :issue_context = hidden_field_tag :issue_context
= f.submit class: 'btn' = f.submit class: 'btn'
- elsif issue.milestone - elsif issue.milestone
......
%h3.page-title %h3.page-title
Issue ##{@issue.iid} Issue ##{@issue.iid}
%span.pull-right %span.pull-right.issue-btn-group
- if can?(current_user, :write_issue, @project) - if can?(current_user, :write_issue, @project)
= link_to new_project_issue_path(@project), class: "btn btn-grouped", title: "New Issue", id: "new_issue_link" do = link_to new_project_issue_path(@project), class: "btn btn-grouped", title: "New Issue", id: "new_issue_link" do
%i.icon-plus %i.icon-plus
...@@ -16,10 +16,11 @@ ...@@ -16,10 +16,11 @@
%i.icon-edit %i.icon-edit
Edit Edit
.votes-holder .clearfix
.votes-holder
#votes= render 'votes/votes_block', votable: @issue #votes= render 'votes/votes_block', votable: @issue
.back-link .back-link
= link_to project_issues_path(@project) do = link_to project_issues_path(@project) do
← To issues list ← To issues list
%span.milestone-nav-link %span.milestone-nav-link
...@@ -30,14 +31,14 @@ ...@@ -30,14 +31,14 @@
= @issue.milestone.title = @issue.milestone.title
.issue-box{ class: issue_box_class(@issue) } .issue-box{ class: issue_box_class(@issue) }
.state .state.clearfix
%span.state-label .state-label.col-sm-2.col-xs-12
- if @issue.closed? - if @issue.closed?
Closed Closed
- else - else
Open Open
%span.creator %span.creator.col-sm-9.col-xs-12
Created by #{link_to_member(@project, @issue.author)} #{time_ago_with_tooltip(@issue.created_at)} Created by #{link_to_member(@project, @issue.author)} #{time_ago_with_tooltip(@issue.created_at)}
%h4.title %h4.title
......
= form_for [@project, @merge_request], remote: true, html: {class: 'edit-merge_request inline-update'} do |f| = form_for [@project, @merge_request], remote: true, html: {class: 'edit-merge_request inline-update'} do |f|
.row
.col-md-6
%strong.append-right-10 %strong.append-right-10
Assignee: Assignee:
...@@ -9,11 +11,11 @@ ...@@ -9,11 +11,11 @@
- else - else
None None
.pull-right .col-md-6.text-right
%strong.append-right-10 %strong.append-right-10
Milestone: Milestone:
- if can?(current_user, :modify_merge_request, @merge_request) - if can?(current_user, :modify_merge_request, @merge_request)
= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone (none):" }, {class: 'select2 select2-compact'}) = f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2 select2-compact'})
= hidden_field_tag :merge_request_context = hidden_field_tag :merge_request_context
= f.submit class: 'btn' = f.submit class: 'btn'
- elsif merge_request.milestone - elsif merge_request.milestone
......
.issue-box{ class: issue_box_class(@merge_request) } .issue-box{ class: issue_box_class(@merge_request) }
.state .state.clearfix
%span.state-label %span.state-label.col-sm-2.col-xs-12
- if @merge_request.merged? - if @merge_request.merged?
Merged Merged
- elsif @merge_request.closed? - elsif @merge_request.closed?
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- else - else
Open Open
%span.creator %span.creator.col-sm-9.col-xs-12
Created by #{link_to_member(@project, @merge_request.author)} #{time_ago_with_tooltip(@merge_request.created_at)} Created by #{link_to_member(@project, @merge_request.author)} #{time_ago_with_tooltip(@merge_request.created_at)}
%h4.title %h4.title
......
%h3.page-title %h3.page-title
= "Merge Request ##{@merge_request.iid}" = "Merge Request ##{@merge_request.iid}"
%span.pull-right %span.pull-right.issue-btn-group
- if can?(current_user, :modify_merge_request, @merge_request) - if can?(current_user, :modify_merge_request, @merge_request)
- if @merge_request.open? - if @merge_request.open?
.btn-group.pull-left .btn-group.pull-left
......
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