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

Timer Formats #345

Merged
merged 19 commits into from May 13, 2019

Conversation

Projects
None yet
4 participants
@rperez89
Copy link
Contributor

commented Mar 29, 2019

Years and Month formats for the timer. #300

Screen Shot 2019-03-28 at 8 48 18 PM

@bpierre @sohkai let me know your thoughts

rperez89 added some commits Mar 27, 2019

Show resolved Hide resolved devbox/apps/Timer.js Outdated

@bpierre bpierre added this to the @aragon/ui@1.0.0 milestone Apr 26, 2019

Show resolved Hide resolved devbox/apps/Timer.js Outdated
@AquiGorka

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

@rperez89 when running the devbox I get the following:

If you take a close look, the first two timers are going forward instead of counting down, and the second one which has showEmpty set to true, is displaying elements with zeros (which is not what that prop is for).

Would you mind taking a look?

@rperez89

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

Hi @AquiGorka I thought that i maybe broke something but i just switched to master and is working like this, the first two are going forward because there is no end date set.

About the showEmpty i think that is the way it shoud work.

Screen Shot 2019-05-02 at 8 16 48 PM

Maybe i am cofused with something.
If this is a bug let me know.

@AquiGorka
Copy link
Contributor

left a comment

🎉 @rperez89 thank you for the work and for double checking the functionality regarding my last comment.

Show resolved Hide resolved src/utils/date.js Outdated

bpierre added some commits May 10, 2019

Timer: accurate calculation of time units
difference() is now accurate + allow to specify the units.
Re-render every second (instead of 30 FPS)
We generally don’t need to be that precise, but it might be added as a
prop if we find out it’s needed in some cases.

@bpierre bpierre requested a review from sohkai May 11, 2019

@sohkai

sohkai approved these changes May 13, 2019

Copy link
Member

left a comment

Might be useful to have a short countdown to 0 in the devbox, to make sure this works well.

Show resolved Hide resolved devbox/apps/Timer.js Outdated
Show resolved Hide resolved src/components/Timer/Timer.js

bpierre added some commits May 13, 2019

Redraw: sync on the interval
For example, if the interval is set to 1000, it will be synced as close
as possible (depending on where the next requestAnimationFrame tick
falls) to the tick of every second.
Display a dash (nothing) if the starting time is in the future
Also excludes -0 to prevent it to stay two seconds on the zero (since
the tick doesn’t fall exactly on the seconds).

@bpierre bpierre merged commit 3ab3c6c into aragon:master May 13, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.