Still working out one or two minor things but for the most part it is completely functional!
I set the timers to start at 1min and 30sec so you can see the jars fill up faster. Once the jar fills up it pops up on the side!
Decided to go for a different layout and to have a bit of fun with images and sounds. Any comments, criticism and bugs found, please leave a comment. Thanks!
Now, seriously, I do think itās a bit too red, to the point that itās hard on the eyes after a while.
I did love some things, like the possibility of muting sounds and adding your own sounds.
I canāt run it, though. I may have ran it one or two days ago, not sure. The fact that the notification area on the top left is greyed out on me, tells me that maybe i did open it before. I had a popup asking me if I allowed or blocked the app from receiving notifications, and I blocked. It should still work, imo. Also, I find it a bit annoying that it remembers the settings from the last time I opened it. My guess is that you are using cookies or some form of storage, which Iām not too fond of in this kind of setting
Yes, my pomodoro saves user settings in localStorage, but not Notification.permission. That one browser remembers on its own for each specific domain. The popup to allow it can only be run if you havenāt previously selected allow or deny (you could dismiss it too), so a site can only request permission as long as you havenāt given a definitive answer.
To reset it you would need to do so in the browser: in Chrome click on the badge at the left edge of the address bar (it displays an empty page or a lock depending on http(s) protocol), in Firefox Ctrl+I --> Permissions, then reload the page. As you can see, after youāve made your choice, itās out of my hands.
Also, seems we have a different tolerance for red:) I should probably choose a lighter color.
There is strange behavior I noticed ā when you press stop and then start while countdown is in progress the timer adds an extra minute. Is this supposed to be punishment for pausing during an ongoing session? Bug or feature?
Was there a reason for limiting break length to 15 minutes? Pomodoro technique suggests 3, 5, 15 and 30 minutes for breaks, but of course itās ultimately up to you.
Overall Iām pleased, but I was surprised with how much js this app required. I built two modules, one for the āengineā of the clock, and one for UI interaction. I ran into some headaches that required a less wholly-modular approach than I desiredā¦ I had to but the setInterval id var outside of both modulesā¦various ways I tried to accomplish it inside properties didnāt work for me. I also tried to put everything in an immediately-invoked function, but I sometimes had issues where I needed to refer to a separate moduleās property with full name, where I couldnāt use āthisā and $(this) because they would point to the same thingā¦ Sorry, Iām sure thatās confusing. Anyhow, wondering if my approach is sensible and succinct overall. Little patience for CSS these days, so my UI remains simple.
It was easy at first until I started to see the logic behind the break times and when I decided I wanted to animate the juice inside the soft drink container, haha, working with SVG math requires a lot of focus and logic; the logic behind the juice filling up isnāt that hard but I struggled since it was my first time working with SVG.
I used a modular javascript approach, one for the clock logic, another one for the audiovisuals. I also had to patch a styling mistake with the soft-drink using JS resize events. Design-wise, Iām surprised it looks that way, thanks to Skeleton (CSS Mini-Framework) and that amazing gradient and backgrounds I found. I spent most of the design time making it responsive. Also the first time I used Sass and ES6.
Hereās mine. I couldnāt figure out how to fiddle with the chart colors and Iām worried it looks a little vomity. Please let me know what you think!
I really like the visual representation of the break time+work time. Something I noticed: you can reduce the work and break length to negative and zero values. This obviously ends up in undefined behavior. Try doing a boundary check if the user makes it go below 1:00.
Also if you learn some basic HTML canvas, you can actually have the clock representation be animated. Itās pretty neat, just in case you want to try something like it.