thamara / time-to-leave

Log work hours and get notified when it's time to leave the office and start to live.
http://timetoleave.app
GNU General Public License v3.0
463 stars 272 forks source link

Adding an animation to the workday waiver holidays table when switching contents #1015

Closed araujoarthur0 closed 1 year ago

araujoarthur0 commented 1 year ago

Related issue

Closes #1009

Before: holidays

After: holidays2

Also limited the min width of the date column so it stops breaking when the holiday names are too big.

araujoarthur0 commented 1 year ago

The gifs are awfully slow, but currently there's a split second in which the table is empty and the window just pops up and down. Now it waits in time to paint the new table.

tupaschoal commented 1 year ago

Seems like the tests covering clearing the table need a look @araujoarthur0

tupaschoal commented 1 year ago

@araujoarthur0 the tests are failing cause the rows are not immediately removed because of the fadeout, need to wait for the fadeout to happen or disable them before running the tests.

araujoarthur0 commented 1 year ago

Seems the tests are failing on main as well

araujoarthur0 commented 1 year ago

Turns out it was also failing for me in main because of a saved preference from another test. Restoring the default preferences at the beginning of the test fixed the second issue. Now back to the animation issue.

araujoarthur0 commented 1 year ago

The removal wasn't working because $(this) does not work in a lambda like I did. Fixing it returns the animation problems, so I'll rethink my approach.

araujoarthur0 commented 1 year ago

Fixed the implementation by using a temporary table in which the html operations happen in the background, and finish by switching the two tables.

Also fixed it that choosing '--' as a country was not clearing the table, and updating the year was not updating the table holidays.

codecov[bot] commented 1 year ago

Codecov Report

Merging #1015 (e9b6178) into main (802d991) will increase coverage by 0.07%. Report is 1 commits behind head on main. The diff coverage is 77.27%.

@@            Coverage Diff             @@
##             main    #1015      +/-   ##
==========================================
+ Coverage   73.17%   73.25%   +0.07%     
==========================================
  Files          26       26              
  Lines        2188     2202      +14     
  Branches      345      346       +1     
==========================================
+ Hits         1601     1613      +12     
- Misses        587      589       +2     
Files Coverage Δ
src/workday-waiver.js 77.41% <77.27%> (+0.43%) :arrow_up:
araujoarthur0 commented 1 year ago

\changelog-update Message: Enhancement [#1009]: Adding an animation to the workday waiver holidays table when the contents switch