New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mention completion for issue editor. #3136
Changes from 3 commits
2a0f23f
aae6ce3
019ff9c
4795084
1e8dae8
914d3c3
a9aa351
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.tribute-container { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
height: auto; | ||
max-height: 300px; | ||
max-width: 500px; | ||
overflow: auto; | ||
display: block; | ||
box-shadow: 0px 1px 3px 1px #c7c7c7; | ||
z-index: 999999; } | ||
.tribute-container ul { | ||
margin: 0; | ||
margin-top: 2px; | ||
padding: 0; | ||
list-style: none; | ||
background: #ffffff; } | ||
.tribute-container li { | ||
padding: 8px 12px; | ||
border-bottom: 1px solid #dcdcdc; | ||
cursor: pointer; } | ||
.tribute-container li.highlight, .tribute-container li:hover { | ||
background: #2185D0; | ||
color: #ffffff;} | ||
.tribute-container li img { | ||
display: inline-block; | ||
vertical-align: middle; | ||
width: 28px; | ||
margin-right: 5px; | ||
} | ||
.tribute-container li span { | ||
font-weight: bold; } | ||
.tribute-container li span.fullname { | ||
font-weight: normal; | ||
font-size: 0.8rem; | ||
margin-left: 3px;} | ||
.tribute-container li.no-match { | ||
cursor: default; } | ||
.tribute-container .menu-highlighted { | ||
font-weight: bold; } |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,33 @@ | |
{{if .RequireDropzone}} | ||
<script src="{{AppSubUrl}}/vendor/plugins/dropzone/dropzone.js"></script> | ||
{{end}} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: delete blank line for consistency |
||
{{if .RequireTribute}} | ||
<script src="{{AppSubUrl}}/vendor/plugins/tribute/tribute.min.js"></script> | ||
|
||
{{if .Assignees}} | ||
<script> | ||
var issuesTribute = new Tribute({ | ||
values: [ | ||
{{ range .Assignees }} | ||
{key: '{{.Name}} {{.FullName}}', value: '{{.Name}}', | ||
name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'}, | ||
{{ end }} | ||
], | ||
noMatchTemplate: function () { return null }, | ||
menuItemTemplate: function (item) { | ||
var user = item.original; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: should the function body (lines 76-81) be indented? |
||
var itemStr = '<img src="' + user.avatar + '"/><span class="name">' + user.name + '</span>'; | ||
if (user.fullname && user.fullname != '') { | ||
itemStr += '<span class="fullname">' + user.fullname + '</span>'; | ||
} | ||
return itemStr; | ||
} | ||
}) | ||
issuesTribute.attach(document.getElementById('content')) | ||
</script> | ||
{{end}} | ||
{{end}} | ||
<script src="{{AppSubUrl}}/vendor/plugins/autolink/autolink.js"></script> | ||
<script src="{{AppSubUrl}}/vendor/plugins/emojify/emojify.min.js"></script> | ||
<script src="{{AppSubUrl}}/vendor/plugins/clipboard/clipboard.min.js"></script> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we also should require tribute in CompareAndPullRequest