Improve UI on mobile (#19546)
Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience. - Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row. - The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that. - The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row. - The notification table will now be show a scrollbar instead of overflow. - The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high. - The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile. - Fixes to not overflow the tables but instead force them to be scrollable. - When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
This commit is contained in:
parent
ac6c338428
commit
3725fa28cc
16 changed files with 105 additions and 16 deletions
|
@ -10,7 +10,7 @@
|
||||||
</div>
|
</div>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<table class="ui very basic striped table">
|
<table class="ui very basic striped table unstackable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<form method="post" action="{{AppSubUrl}}/admin">
|
<form method="post" action="{{AppSubUrl}}/admin">
|
||||||
<table class="ui very basic striped table">
|
<table class="ui very basic striped table unstackable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<table class="ui very basic striped table">
|
<table class="ui very basic striped table unstackable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-sortt-asc="username" data-sortt-desc="reverseusername">
|
<th data-sortt-asc="username" data-sortt-desc="reverseusername">
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{{.i18n.Tr "admin.monitor.queues"}}
|
{{.i18n.Tr "admin.monitor.queues"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<table class="ui very basic striped table">
|
<table class="ui very basic striped table unstackable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{.i18n.Tr "admin.monitor.queue.name"}}</th>
|
<th>{{.i18n.Tr "admin.monitor.queue.name"}}</th>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
{{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}})
|
{{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<table id="notice-table" class="ui very basic select selectable table">
|
<table id="notice-table" class="ui very basic select selectable table unstackable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
{{template "admin/base/search" .}}
|
{{template "admin/base/search" .}}
|
||||||
</div>
|
</div>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<table class="ui very basic striped table">
|
<table class="ui very basic striped table unstackable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th>
|
<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<table class="ui very basic striped table">
|
<table class="ui very basic striped table unstackable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
{{template "admin/repo/search" .}}
|
{{template "admin/repo/search" .}}
|
||||||
</div>
|
</div>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<table class="ui very basic striped table">
|
<table class="ui very basic striped table unstackable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th>
|
<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th>
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<table class="ui very basic striped table">
|
<table class="ui very basic striped table unstackable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" .SortType false}}</th>
|
<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" .SortType false}}</th>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="page-content repository">
|
<div class="page-content repository">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui three column stackable grid">
|
<div class="ui three column grid issue-list-headers">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
{{template "repo/issue/navbar" .}}
|
{{template "repo/issue/navbar" .}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="page-content repository view issue pull">
|
<div class="page-content repository view issue pull">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui two column stackable grid">
|
<div class="ui two column grid">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
{{template "repo/issue/navbar" .}}
|
{{template "repo/issue/navbar" .}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -41,6 +41,9 @@
|
||||||
{{if .Repository.OriginalURL}} ({{$.i18n.Tr "repo.migrated_from" (.Repository.OriginalURL|Escape) (.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}
|
{{if .Repository.OriginalURL}} ({{$.i18n.Tr "repo.migrated_from" (.Repository.OriginalURL|Escape) (.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}
|
||||||
</span>
|
</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
<a class="inline-timeline-avatar" href="{{.Issue.Poster.HomeLink}}">
|
||||||
|
{{avatar .Issue.Poster}}
|
||||||
|
</a>
|
||||||
<span class="text grey">
|
<span class="text grey">
|
||||||
<a class="author"{{if gt .Issue.Poster.ID 0}} href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.GetDisplayName}}</a>
|
<a class="author"{{if gt .Issue.Poster.ID 0}} href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.GetDisplayName}}</a>
|
||||||
{{.i18n.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr | Safe}}
|
{{.i18n.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr | Safe}}
|
||||||
|
@ -50,12 +53,12 @@
|
||||||
<div class="comment-header-right actions df ac">
|
<div class="comment-header-right actions df ac">
|
||||||
{{if gt .Issue.ShowRole 0}}
|
{{if gt .Issue.ShowRole 0}}
|
||||||
{{if (.Issue.ShowRole.HasRole "Writer")}}
|
{{if (.Issue.ShowRole.HasRole "Writer")}}
|
||||||
<div class="ui basic label">
|
<div class="ui basic label role-label">
|
||||||
{{$.i18n.Tr "repo.issues.collaborator"}}
|
{{$.i18n.Tr "repo.issues.collaborator"}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if (.Issue.ShowRole.HasRole "Owner")}}
|
{{if (.Issue.ShowRole.HasRole "Owner")}}
|
||||||
<div class="ui basic label">
|
<div class="ui basic label role-label">
|
||||||
{{$.i18n.Tr "repo.issues.owner"}}
|
{{$.i18n.Tr "repo.issues.owner"}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -35,6 +35,11 @@
|
||||||
({{$.i18n.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}
|
({{$.i18n.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}
|
||||||
</span>
|
</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
{{if gt .Poster.ID 0}}
|
||||||
|
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
|
||||||
|
{{avatar .Poster}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
<span class="text grey">
|
<span class="text grey">
|
||||||
<a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
|
<a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
|
||||||
{{.Poster.GetDisplayName}}
|
{{.Poster.GetDisplayName}}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
.table.segment {
|
.table.segment {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
overflow-x: scroll;
|
||||||
|
|
||||||
&:not(.striped) {
|
&:not(.striped) {
|
||||||
thead {
|
thead {
|
||||||
|
@ -62,6 +63,9 @@
|
||||||
|
|
||||||
dd {
|
dd {
|
||||||
margin-left: 275px;
|
margin-left: 275px;
|
||||||
|
@media @mediaSm {
|
||||||
|
margin-left: 5%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dt {
|
dt {
|
||||||
|
@ -72,6 +76,11 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
|
@media @mediaSm {
|
||||||
|
width: auto;
|
||||||
|
margin-right: .5em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -861,6 +861,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Don't show the mobile oriented avatar ".inline-timeline-avatar" on desktop. Desktop uses the avatar with class ".timeline-avatar" */
|
||||||
|
.inline-timeline-avatar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.avatar.image,
|
.avatar.image,
|
||||||
.avatar.image img {
|
.avatar.image img {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
@ -1655,7 +1660,7 @@
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
padding-top: .25rem;
|
padding-top: .25rem;
|
||||||
|
|
||||||
.ui.button {
|
.ui.button:not(.btn-submit) {
|
||||||
padding-left: .5rem;
|
padding-left: .5rem;
|
||||||
padding-right: .5rem;
|
padding-right: .5rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -2662,7 +2667,7 @@
|
||||||
background: var(--color-box-header);
|
background: var(--color-box-header);
|
||||||
border-bottom: 1px solid var(--color-secondary) !important;
|
border-bottom: 1px solid var(--color-secondary) !important;
|
||||||
font-weight: normal !important;
|
font-weight: normal !important;
|
||||||
padding: .5rem 1rem !important;
|
padding: .5rem 1rem;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: var(--color-text-light-2);
|
color: var(--color-text-light-2);
|
||||||
|
@ -2965,8 +2970,11 @@ tbody.commit-list {
|
||||||
}
|
}
|
||||||
|
|
||||||
.repo-buttons {
|
.repo-buttons {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
word-break: keep-all;
|
||||||
|
|
||||||
@media @mediaSm {
|
@media @mediaSm {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
|
@ -3011,6 +3019,11 @@ tbody.commit-list {
|
||||||
pointer-events: none !important;
|
pointer-events: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@media @mediaSm {
|
||||||
|
.svg {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag-code {
|
.tag-code {
|
||||||
|
@ -3260,4 +3273,59 @@ td.blob-excerpt {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.issue-list-headers.ui[class].grid {
|
||||||
|
> div:nth-child(1) {
|
||||||
|
order: 1;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
> div:nth-child(2) {
|
||||||
|
order: 3;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
> div.column:not(.row):nth-child(3) {
|
||||||
|
order: 2;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.repository.view.issue .comment-list {
|
||||||
|
.timeline,
|
||||||
|
.timeline-item {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline {
|
||||||
|
&::before {
|
||||||
|
left: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-timeline-avatar {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: auto;
|
||||||
|
|
||||||
|
img.avatar.image {
|
||||||
|
height: 24px;
|
||||||
|
width: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-header {
|
||||||
|
&::before,
|
||||||
|
&::after {
|
||||||
|
content: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Don't show the general avatar, we show the inline avatar on mobile.
|
||||||
|
* And don't show the role labels, there's no place for that. */
|
||||||
|
.timeline-avatar,
|
||||||
|
.comment-header-right .role-label {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,3 +175,7 @@
|
||||||
max-width: 60px;
|
max-width: 60px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#notification_div .tab.segment {
|
||||||
|
overflow-x: scroll;
|
||||||
|
}
|
||||||
|
|
Reference in a new issue