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

Open to time #1748

Open
wants to merge 4 commits into
base: master
from

Conversation

@pacaplan
Copy link

commented May 23, 2019

This implements features / fixes related to opening to a particular time.

1. Scroll to time based on openToDate prop

When openToDate prop is present and selected prop is not, set the active (visible) time based on openToDate rather than the current time.

This addresses #1150.

2. Don’t display time as selected when selected prop is not present

The previous behavior was strange; it would display the current time as selected, but only if the current time exactly matched one of the time selections. E.g if you open the time window at 4:00 you will
see that time as selected, but not if you open it at 4:01 (assuming greater than 1 minute interval).

3. Correctly calculated the closest time to the nearest interval

Previously it was setting active time to the top of the hour, unless there was an exact match.

pacaplan added 3 commits May 23, 2019
When openToDate prop is present and selected prop is not, set the active
(visible) time based on openToDate rather than the current time.

This addresses #1150.
The previous behavior was very strange; it would display the current
time as selected, but only if the current time exactly matched one
of the time selections. E.g if you open the time window at 4:00 you will
see that time as selected, but not if you open it at 4:01 (assuming
greater than 1 minute interval).
Previously it was setting active time to the top of the hour, unless there
was an exact match.
@codecov

This comment has been minimized.

Copy link

commented May 23, 2019

Codecov Report

Merging #1748 into master will increase coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1748      +/-   ##
==========================================
+ Coverage   90.45%   90.46%   +<.01%     
==========================================
  Files          17       17              
  Lines        1226     1227       +1     
  Branches      208      208              
==========================================
+ Hits         1109     1110       +1     
  Misses         10       10              
  Partials      107      107
Impacted Files Coverage Δ
src/calendar.jsx 89.75% <ø> (ø) ⬆️
src/time.jsx 83.05% <66.66%> (+0.29%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d5cc88...79e8f7e. Read the comment docs.

… into open-to-time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.