Web: As a contributor, I'd like to see the correct time estimate on a Gitcoin Issue.

Created on 26 Oct 2018  路  4Comments  路  Source: gitcoinco/web

User Story

As a contributor, I'd like to see the correct time estimate on a Gitcoin Issue.

Why Is this Needed

317 years is not an option that a funder can select in the "expires in" section of the funder form.

Description

Example: https://gitcoin.co/issue/MetaMask/metamask-extension/3127/1155

On the issue details page:
screen shot 2018-10-24 at 14 15 58

On the funder page:
screen shot 2018-10-25 at 16 27 03

Current Behavior

"Time left" estimates should match what the funder put up in the funding form.

Expected Behavior

Never should show up as "never" or something like an infinity sign.

Definition of Done

  1. The "Expires in" value selected by a the funder for an issue should match the "time left" countdown on the issue details page.
Gitcoin Funder Form Gitcoin Issue Detail bug backlog

All 4 comments

I'm testing out a few solutions to this:

The following seems to be the easiest, but it will not work:

if (expires_date - new Date().setFullYear(new Date().getFullYear() + 1) > 1) {
      $('#expires_date').text('∞');
}

A working solution is to do:

Javascript: 
if (expires_date - new Date().setFullYear(new Date().getFullYear() + 1) > 1) {
      $('#expires_date').hide();
      $('#expires_date_infinite').show();
}

HTML: 
<span class="bounty-info-text" id="expires_date"></span>
<span class="bounty-info-text" id="expires_date_infinite" style="display: none;">&infin;</span>

But, this is a horrible idea since the changes are not reflected on the issue explorer and it's not worth hard coding it there too.

I'll keep trying and report back when I can figure out the whole label scheme that is currently being used.

Great @Anish-Agnihotri Im fixing this one in the bounty detail and explorer
Bounty detail:
image

Explorer
image

Looks good! Thanks @octavioamu!

Looks great! Thanks for taking a look at this @Anish-Agnihotri and @octavioamu!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NukeManDan picture NukeManDan  路  3Comments

pelsasser picture pelsasser  路  4Comments

mbeacom picture mbeacom  路  4Comments

aashutoshrathi picture aashutoshrathi  路  4Comments

wizzfile picture wizzfile  路  3Comments