Skip to content

Commit

Permalink
Fix dashboard UI bugs and more (go-gitea#14767)
Browse files Browse the repository at this point in the history
This PR fixes a few UI bugs I spontaneously encountered:

- Fixes emojis in repo titles getting head-cut and tail-cut in dashboard feed due to introduction of 1.25 em emojis at 1 em line-height, by simply using the original 1 3/7 em value of `semantic.css`
- Fixes regression (too long repo names should be capped to 70%) in go-gitea#13828 due to flex children not respecting properties like `overflow: hidden;`, and removes a block of dead style code
- Follow-up to go-gitea#14761, removes extraneous code for top navbar and correct right margin for Font Awesome
- Fixes color emphasis inversion in arc-green theme for top right buttons (edit, delete) on commit view boxes
  • Loading branch information
CL-Jeremy authored Feb 25, 2021
1 parent 8f4d554 commit 4172b19
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 30 deletions.
2 changes: 1 addition & 1 deletion templates/base/head_navbar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
<div class="divider"></div>

<a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
<i class="icon settings"></i>
{{svg "octicon-server"}}
{{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
</a>
{{end}}
Expand Down
8 changes: 4 additions & 4 deletions templates/user/dashboard/repolist.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@
<ul class="repo-owner-name-list">
<li v-for="repo in repos" :class="{'private': repo.private || repo.internal}">
<a class="repo-list-link df ac sb" :href="suburl + '/' + repo.full_name">
<div class="f1">
<div class="text truncate item-name f1">
<component v-bind:is="repoIcon(repo)" size="16"></component>
<strong class="text truncate item-name">${repo.full_name}</strong>
<strong>${repo.full_name}</strong>
<span v-if="repo.archived">
{{svg "octicon-archive" 16 "ml-2"}}
</span>
Expand Down Expand Up @@ -175,9 +175,9 @@
<ul class="repo-owner-name-list">
<li v-for="org in organizations">
<a class="repo-list-link df ac sb" :href="suburl + '/' + org.name">
<div class="f1">
<div class="text truncate item-name f1">
{{svg "octicon-organization" 16 "mr-2"}}
<strong class="text truncate item-name">${org.name}</strong>
<strong>${org.name}</strong>
</div>
<div class="text light grey df ac">
${org.num_repos}
Expand Down
4 changes: 0 additions & 4 deletions web_src/less/_base.less
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,6 @@ a.ui.card:hover,
margin-right: 0;
}

.svg {
margin-right: .75em;
}

.searchbox {
background-color: #f4f4f4 !important;

Expand Down
21 changes: 2 additions & 19 deletions web_src/less/_dashboard.less
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@
margin-left: .35rem;
}

line-height: 1.2;

> .ui.grid {
margin-left: auto;
margin-right: auto;
Expand Down Expand Up @@ -181,23 +179,8 @@
margin-right: .25rem;
}

.repo-owner-name-list {
.item-name {
max-width: 70%;
margin-bottom: -4px;
}
}

#collaborative-repo-list {
.owner-and-repo {
max-width: 80%;
margin-bottom: -5px;
}

.owner-name {
max-width: 120px;
margin-bottom: -5px;
}
.repo-owner-name-list .item-name {
max-width: 70%;
}
}
}
5 changes: 3 additions & 2 deletions web_src/less/_repository.less
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
padding: 5px;
margin-left: 5px;
line-height: 1;
color: #767676;
color: var(--color-text);
vertical-align: middle;
background: transparent;
border: 0;
Expand All @@ -399,7 +399,8 @@
}

.btn-octicon.disabled {
color: #bbbbbb;
color: inherit;
opacity: var(--opacity-disabled);
cursor: default;
}

Expand Down

0 comments on commit 4172b19

Please sign in to comment.