1
0
Fork 0
forked from forgejo/forgejo

Multiple GitGraph improvements: Exclude PR heads, Add branch/PR links, Show only certain branches, (#12766)

* Multiple GitGraph improvements.

Add backend support for excluding PRs, selecting branches and files.

Fix #10327

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @silverwind

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @silverwind

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Only show refs in dropdown we display on the graph

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @silverwind

Signed-off-by: Andrew Thornton <art27@cantab.net>

* use flexbox for ui header

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Move Hide Pull Request button to the dropdown

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add SHA and user pictures

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix test

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix test 2

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fixes

* async

* more tweaks

* use tabs in tmpl

Signed-off-by: Andrew Thornton <art27@cantab.net>

* remove commented thing

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix linting

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update web_src/js/features/gitgraph.js

Co-authored-by: silverwind <me@silverwind.io>

* graph tweaks

* more tweaks

* add title

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix loading indicator z-index and position

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
zeripath 2020-11-08 17:21:54 +00:00 committed by GitHub
parent d4e0b28655
commit c05a8abc76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 588 additions and 126 deletions

View file

@ -1391,6 +1391,10 @@ table th[data-sortt-desc] {
}
}
.dropdown .ui.label {
margin-left: 0 !important;
}
.ui.dropdown .menu .item {
border-radius: 0;
}

View file

@ -1462,6 +1462,7 @@
#commits-table td.sha .sha.label,
#repo-files-table .sha.label,
#rev-list .sha.label,
.timeline-item.commits-list .singular-commit .sha.label {
border: 1px solid #bbbbbb;

View file

@ -1,8 +1,21 @@
#git-graph-container {
float: left;
display: block;
overflow-x: auto;
overflow-x: scroll;
width: 100%;
min-height: 350px;
> .ui.segment.loading {
border: 0;
z-index: 1;
min-height: 246px;
}
h2 {
display: flex;
justify-content: space-between;
align-items: center;
}
.color-buttons {
margin-right: 0;
@ -12,11 +25,49 @@
padding-bottom: 10px;
}
#flow-select-refs-dropdown {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
min-width: 250px;
border-right: none;
.ui.label {
max-width: 180px;
display: inline-flex !important;
align-items: center;
.truncate {
display: inline-block;
max-width: 140px;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: top;
white-space: nowrap;
}
}
.dropdown.icon {
display: none;
}
.default.text {
padding-top: 4px;
padding-bottom: 4px;
}
input.search {
position: relative;
top: 1px;
}
}
li {
list-style-type: none;
height: 20px;
line-height: 20px;
height: 24px;
line-height: 24px;
white-space: nowrap;
display: flex;
align-items: center;
.node-relation {
font-family: "Bitstream Vera Sans Mono", "Courier", monospace;
@ -31,10 +82,6 @@
font-size: 80%;
}
a {
color: #000000;
}
a:hover {
text-decoration: underline;
}
@ -59,16 +106,39 @@
#rev-list {
margin: 0;
padding: 0 5px;
min-width: 95%;
padding: 0;
width: 100%;
li.highlight,
li.hover {
li.highlight.hover {
background-color: rgba(0, 0, 0, .05);
}
li.highlight.hover {
background-color: rgba(0, 0, 0, .1);
.tags a.button {
padding: 2px 4px;
}
.sha.label {
padding-top: 5px;
padding-bottom: 3px;
}
.sha.label .shortsha {
padding-top: 0;
}
.sha.label .shortsha-pad {
padding-right: 10px;
}
.sha.label .ui.detail.icon.button {
padding-top: 3px;
margin-top: -5px;
padding-bottom: 1px;
}
.author .ui.avatar.image {
width: auto;
height: 18px;
}
}

View file

@ -1360,10 +1360,6 @@ td.blob-hunk {
}
}
input {
background: #2e323e;
}
.settings .key.list .item:not(:first-child) {
border-top: 1px solid var(--color-secondary);
}
@ -1608,6 +1604,12 @@ a.blob-excerpt:hover {
color: #dbdbdb;
}
.ui.active.label {
background: #393d4a;
border-color: #393d4a;
color: #dbdbdb;
}
a.ui.label:hover,
a.ui.labels .label:hover {
background-color: #505667 !important;
@ -1617,6 +1619,7 @@ a.ui.labels .label:hover {
.sha.label,
.repository #repo-files-table .sha.label,
.repository #commits-table td.sha .sha.label,
#rev-list .sha.label,
.repository .timeline-item.commits-list .singular-commit .sha.label,
.repository.view.issue .comment-list .timeline-item.commits-list .singular-commit .shabox .sha.label {
border-color: #505667;
@ -1624,6 +1627,7 @@ a.ui.labels .label:hover {
.sha.label.isSigned .detail.icon,
.repository #commits-table td.sha .sha.label.isSigned .detail.icon,
#rev-list .sha.label.isSigned .detail.icon,
.repository #repo-files-table .sha.label.isSigned .detail.icon,
.repository .timeline-item.commits-list .singular-commit .sha.label.isSigned .detail.icon,
.repository.view.issue .comment-list .timeline-item.commits-list .singular-commit .shabox .sha.label.isSigned .detail.icon {
@ -1743,14 +1747,6 @@ a.ui.labels .label:hover {
color: var(--color-secondary-dark-6);
}
#git-graph-container li a {
color: #c79575;
}
#git-graph-container li .author {
color: #c79575;
}
.ui.header .sub.header {
color: var(--color-secondary-dark-6);
}
@ -1970,6 +1966,10 @@ a.ui.labels .label:hover {
}
}
.ui.loading.segment:before {
background: #353945;
}
.ui.popup {
background-color: #383c4a;
color: var(--color-secondary-dark-6);
@ -2053,6 +2053,10 @@ img[src$="/img/matrix.svg"] {
filter: invert(80%);
}
#git-graph-container li .time {
color: #6a737d;
}
#git-graph-container.monochrome #rel-container .flow-group {
stroke: dimgrey;
fill: dimgrey;
@ -2077,11 +2081,6 @@ img[src$="/img/matrix.svg"] {
}
}
#git-graph-container #rev-list li.highlight,
#git-graph-container #rev-list li.hover {
background-color: rgba(255, 255, 255, .05);
}
#git-graph-container #rev-list li.highlight.hover {
background-color: rgba(255, 255, 255, .1);
}