Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

2120/claim countdowns #2158

Merged
merged 6 commits into from
Jan 17, 2022
Merged

2120/claim countdowns #2158

merged 6 commits into from
Jan 17, 2022

Conversation

alfetopito
Copy link
Contributor

Summary

Closes #2120

Wiring up the countdown in the Claim table

Screen Shot 2022-01-14 at 12 09 56

Seconds is a bonus that I can remove if it doesn't look good.

Anywhere else we should have a countdown?

To Test

  1. Check an address which has claims
  • Watch the count going down

    Background

Optional: Give background information for changes you've made, that might be difficult to explain via comments

@alfetopito alfetopito self-assigned this Jan 14, 2022
@alfetopito alfetopito requested a review from a team January 14, 2022 20:12
@github-actions
Copy link
Contributor

  • 🔭 GP Swap: Gnosis Protocol v2 Swap UI

@W3stside
Copy link
Contributor

i'd set a fixed width to the countdown, it bounces around, probably for @biocom

Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works perfect!

src/custom/pages/Claim/ClaimsTable.tsx Show resolved Hide resolved
@elena-zh
Copy link

Hey @alfetopito . great changes!
Unfortunately, I'm not able to see airdrop option for accounts in the latest PRs.. But here is my question: will we show a countdown on this screen as well?
image

@W3stside
Copy link
Contributor

mentioned this in slack but do we not usually depend on the block timestamp instead of computer machine time? (considering the latter can be manipulated via changing machine local time)

@fairlighteth
Copy link
Contributor

Great to see this :)

i'd set a fixed width to the countdown, it bounces around, probably for @biocom

@W3stside Yes indeed, need to review this once merged.

Countdown for the simple airdrop window would be nice too (as @elena-zh suggested).

A suggestion to simplify, but requires a bit more of a logic implementation:

  • Show DATE + Days left >>> March 11, 2022 (in 40 days)
  • Then once we're 1 or 2 days before deadline >>> The logic you have now (counting down).

I see benefit in seeing a clear date/time stamp + a countdown combination. If I want to 'save the date' in my calendar, and only see a countdown, I have to reverse count and figure out the actual time stamp (Yes a tooltip could work here, but what about mobile?).

@alfetopito
Copy link
Contributor Author

Great to see this :)

i'd set a fixed width to the countdown, it bounces around, probably for @biocom

@W3stside Yes indeed, need to review this once merged.

Countdown for the simple airdrop window would be nice too (as @elena-zh suggested).

Easy to add, just need to find out where. Thus it might be better if you do it @biocom

A suggestion to simplify, but requires a bit more of a logic implementation:

* Show DATE + Days left >>> March 11, 2022 (in 40 days)

* Then once we're 1 or 2 days before deadline >>> The logic you have now (counting down).

I see benefit in seeing a clear date/time stamp + a countdown combination. If I want to 'save the date' in my calendar, and only see a countdown, I have to reverse count and figure out the actual time stamp (Yes a tooltip could work here, but what about mobile?).

I have a dumb idea for implementing this but need a better suggestion to present it:
On click on the countdown, show the date and vice-versa.
Or have a button to switch between.
This is easier and covers both cases, but I'm struggling on how to show the users it's an option.

I'll push that in another PR to not mix up things, and can be accepted or not.

@alfetopito
Copy link
Contributor Author

mentioned this in slack but do we not usually depend on the block timestamp instead of computer machine time? (considering the latter can be manipulated via changing machine local time)

Well, the code is based on Uni's claim stuff and they did rely on system clock.
I don't think it's worth the effort as it's in the user's interest to have the local time correct.

  • Worst case local time is in the future: the UI will show as closed an they won't be able to claim
  • Worst case local time is in the past: the UI will allow them to claim past claim window but the tx will revert as the contract prevents it

@alfetopito
Copy link
Contributor Author

Hey @alfetopito . great changes! Unfortunately, I'm not able to see airdrop option for accounts in the latest PRs.

Yeah there was a bug there. It has since been fixed and merge onto claim branch.

But here is my question: will we show a countdown on this screen as well? image

Agree we should. Left it up to @biocom as it'll make more sense he add and style it at once.

@alfetopito alfetopito merged commit 325efc1 into claim Jan 17, 2022
@alfetopito alfetopito deleted the 2120/claim-countdowns branch January 17, 2022 22:18
@alfetopito
Copy link
Contributor Author

Actually, added the airdrop end date to the component #2178

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants