Skip to content
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

bounty: review feedback added #711

Merged
merged 1 commit into from
Mar 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 20 additions & 17 deletions app/assets/v2/css/bounty.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ body {
}

.box {
padding: 1em;
padding: 14px;
border: 1px solid #DBDBDB;
border-radius: 3px;
margin: 0;
Expand Down Expand Up @@ -93,7 +93,7 @@ body {

.bounty-info div {
display: inline;
margin-right: .6em;
margin-right: 15px;
font-family: "Muli-Light";
}

Expand Down Expand Up @@ -124,6 +124,11 @@ body {
border-bottom: 1px solid #D4D4D4;
}

.bounty-actions .tag.usd {
padding-left: 10px;
padding-right: 10px;
}

.tag.keyword {
min-width: 0;
font-size: 11px;
Expand Down Expand Up @@ -180,7 +185,7 @@ body {

.contributor-box svg {
font-size: 24px;
margin-top: .8em;
margin-top: 15px;
margin-bottom: 10px;
color: #333333;
}
Expand All @@ -189,31 +194,32 @@ a.btn{
border-radius: 0.2rem;
}

#right_actions,
#github-link {
display: inline;
.funder-avatar,
.activity-avatar {
text-align: center;
}


#right_actions .button--primary {
margin-right: 10px;
position: relative;
top: 1px;
}

#right_actions .button--primary,
#github-btn {
#btn-white {
padding: 6px 15px;
box-shadow: none;
font-size: 12px;
}

#github-btn {
#btn-white {
border: 1px solid #979797;
color: #0D0764;
border-radius: 3px;
}

#github-btn .github-comment {
#btn-white .github-comment {
border-left: 1px solid #979797;
padding-left: 12px;
margin-left: 5px;
Expand All @@ -223,6 +229,11 @@ a.btn{
margin-bottom: 10px;
}

.funder-avatar,
.activity div {
margin: auto;
}

.fulfilled .activity-status {
margin-bottom: 10px;
}
Expand All @@ -232,10 +243,6 @@ a.btn{
color: #717171;
}

.activity-avatar {
text-align: center;
}

.activity .activity-status svg {
margin-left: 10px;
color: #0ECF7C;
Expand Down Expand Up @@ -289,10 +296,6 @@ a.btn{
float: none;
}

#github-link {
display: inline-flex;
}

#bounty_details .row {
margin: 0px;
padding-left: 10px;
Expand Down
82 changes: 42 additions & 40 deletions app/assets/v2/js/pages/bounty_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ var callbacks = {
var keywords = result.metadata.issueKeywords.split(',');
var tags = [];

if (result.metadata.issueKeywords.length == 0)
return [ 'issue_keywords', null ];

keywords.forEach(function(keyword) {
tags.push('<a href="/explorer/?q=' + keyword.trim() + '"><div class="tag keyword">' + keyword + '</div></a>');
});
Expand Down Expand Up @@ -431,28 +434,6 @@ var do_actions = function(result) {
// actions
var actions = [];

if (show_github_link) {

var github_url = result['github_url'];

// hack to get around the renamed repo for piper's work. can't change the data layer since blockchain is immutable
github_url = github_url.replace('pipermerriam/web3.py', 'ethereum/web3.py');
github_url = github_url.replace('ethereum/browser-solidity', 'ethereum/remix-ide');
var github_tooltip = 'Github is where the issue scope lives. Its also a great place to collaborate with, and get to know, other developers (and sometimes even the repo maintainer themselves!).';

if (result['github_comments']) {
$('#github-link').html(
('<span title="').concat("<div class='tooltip-info tooltip-sm'>") + github_tooltip + '</div>"><a class="btn btn-small font-caption" role="button" target="_blank" id="github-btn" href="' +
github_url + ('">View On Github').concat('<span class="github-comment">') + result['github_comments'] + '</span></a></span>'
);
} else {
$('#github-link').html(
('<span title="').concat("<div class='tooltip-info tooltip-sm'>") + github_tooltip + '</div>"><a class="btn btn-small font-caption" role="button" target="_blank" id="github-btn" href="' +
github_url + ('">View On Github').concat('</a></span>')
);
}
}

if (show_start_stop_work) {

// is enabled
Expand All @@ -462,7 +443,7 @@ var do_actions = function(result) {
href: is_interested ? '/uninterested' : '/interested',
text: is_interested ? 'Stop Work' : 'Start Work',
parent: 'right_actions',
title: 'Start Work in an issue to let the issue funder know that youre starting work on this issue.'
title: is_interested ? 'Notify the funder that you will not be working on this project' : 'Notify the funder that you would like to take on this project'
};

actions.push(interest_entry);
Expand All @@ -477,20 +458,7 @@ var do_actions = function(result) {
href: '/funding/fulfill?source=' + result['github_url'],
text: 'Submit Work',
parent: 'right_actions',
title: 'Use Submit Work when you FINISH work on a bounty. '
};

actions.push(_entry);
}

if (show_increase_bounty) {
var enabled = increase_bounty_enabled;
var _entry = {
enabled: enabled,
href: '/funding/increase?source=' + result['github_url'],
text: 'Add Contribution',
parent: 'right_actions',
title: 'Increase the funding of this bounty'
title: 'Submit work for the funder to review'
};

actions.push(_entry);
Expand All @@ -501,9 +469,9 @@ var do_actions = function(result) {
var _entry = {
enabled: enabled,
href: '/funding/kill?source=' + result['github_url'],
text: 'Kill Bounty',
text: 'Cancel Bounty',
parent: 'right_actions',
title: 'Use Kill Bounty if you want to CANCEL your bounty'
title: 'Cancel bounty and reclaim funds for this issue'
};

actions.push(_entry);
Expand All @@ -525,8 +493,42 @@ var do_actions = function(result) {
actions.push(_entry);
}

render_actions(actions);
if (show_increase_bounty) {
var enabled = increase_bounty_enabled;
var _entry = {
enabled: enabled,
href: '/funding/increase?source=' + result['github_url'],
text: 'Add Contribution',
parent: 'right_actions',
title: 'Increase the funding for this issue',
color: 'white'
};

actions.push(_entry);
}

if (show_github_link) {
var github_url = result['github_url'];
// hack to get around the renamed repo for piper's work. can't change the data layer since blockchain is immutable

github_url = github_url.replace('pipermerriam/web3.py', 'ethereum/web3.py');
github_url = github_url.replace('ethereum/browser-solidity', 'ethereum/remix-ide');
var github_tooltip = 'View issue details and comments on Github';

var _entry = {
enabled: true,
href: github_url,
text: 'View On Github',
parent: 'right_actions',
title: 'View issue details and comments on Github',
comments: result['github_comments'],
color: 'white'
};

actions.push(_entry);
}

render_actions(actions);
});
};

Expand Down
16 changes: 14 additions & 2 deletions app/dashboard/templates/bounty_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ <h4 id="title" class="font-title"></h4>
<div class="col-12 bounty-actions">
<div class="col-12 col-md-8">
<div id="right_actions"></div>
<div id="github-link"></div>
</div>
<div class="col-12 col-md-4">
<div class="tags font-caption align-items-center">
Expand Down Expand Up @@ -142,7 +141,7 @@ <h5 class="bounty-heading">All Activity</h5>
<div class="col-12">
<h5 class="bounty-heading">Funder</h5>
<div class="row box">
<div class="col-12 col-md-1">
<div class="col-12 col-md-1 funder-avatar">
<div id="avatar_url"></div>
</div>
<div class="col-12 col-md-11">
Expand Down Expand Up @@ -174,6 +173,19 @@ <h5 class="bounty-heading">Funder</h5>
<a class="button button--primary accept" role="button" href="[[:href]]" target="[[:target]]">
<span class="font-caption">[[:text]] ( [[:pending_acceptance]] )</span>
</a>
[[else color == 'white']]
<a class="btn btn-small" id="btn-white" role="button" href="[[:href]]" target="[[:target]]">
[[if comments]]
<span class="font-caption">
[[:text]]
<span class="github-comment">
[[:comments]]
</span>
</span>
[[else]]
<span class="font-caption">[[:text]]</span>
[[/if]]
</a>
[[else]]
<a class="button button--primary" role="button" href="[[:href]]" target="[[:target]]">
<span class="font-caption">[[:text]]</span>
Expand Down