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

Fix #5316 #5317

Merged
merged 2 commits into from
Oct 23, 2018
Merged

Fix #5316 #5317

merged 2 commits into from
Oct 23, 2018

Conversation

haggys22
Copy link
Contributor

@haggys22 haggys22 commented Oct 12, 2018

In 24hr mode, when clicking on the left part of 12, 23 was selected

Description

For the edge case on an insideClick, instead of selecting this.max (i.e. 23), this.max - this.roundCount + 1 (i.e. 23 - 12 + 1 = 12) is selected

Motivation and Context

Fixes #5316

How Has This Been Tested?

Tested manually, no test have been added

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes, dev for new features and breaking changes).
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have created a PR in the documentation with the necessary changes.

In 24hr mode, when clicking on the left part of `12`, `23` was selected
@jacekkarczmarczyk
Copy link
Member

Looks good @haggys22 , please only update the unit test

diff --git a/test/unit/components/VTimePicker/VTimePickerClock.spec.js b/test/unit/components/VTimePicker/VTimePickerClock.spec.js
index d8f5f141..3756c6ed 100644
--- a/test/unit/components/VTimePicker/VTimePickerClock.spec.js
+++ b/test/unit/components/VTimePicker/VTimePickerClock.spec.js
@@ -218,6 +218,8 @@ test('VTimePickerClock.js', ({ mount }) => {
     finger.move(120, 0)
     expect(input).toBeCalledWith(0)
     finger.move(135, 90)
+    expect(input).toBeCalledWith(4)
+    finger.move(90, 135)
     expect(input).toBeCalledWith(7)
   })
 })

@jacekkarczmarczyk jacekkarczmarczyk removed their request for review October 16, 2018 05:55
@codecov
Copy link

codecov bot commented Oct 18, 2018

Codecov Report

Merging #5317 into master will increase coverage by 0.6%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #5317     +/-   ##
=========================================
+ Coverage   89.11%   89.72%   +0.6%     
=========================================
  Files         230      246     +16     
  Lines        5486     5830    +344     
  Branches     1386     1455     +69     
=========================================
+ Hits         4889     5231    +342     
- Misses        475      476      +1     
- Partials      122      123      +1
Impacted Files Coverage Δ
src/components/VTimePicker/VTimePickerClock.js 100% <100%> (ø) ⬆️
src/components/VTabs/mixins/tabs-watchers.js 84.61% <0%> (-15.39%) ⬇️
src/directives/ripple.ts 34.51% <0%> (-5.71%) ⬇️
src/components/VBtn/VBtn.ts 96.87% <0%> (-3.13%) ⬇️
src/components/VTabs/VTab.js 96.42% <0%> (-0.45%) ⬇️
src/components/VInput/VInput.js 95.52% <0%> (-0.07%) ⬇️
src/mixins/routable.ts 100% <0%> (ø) ⬆️
src/components/VTabs/VTabsItems.js 100% <0%> (ø) ⬆️
.../components/VProgressCircular/VProgressCircular.ts 100% <0%> (ø) ⬆️
src/components/VTimePicker/VTimePicker.js 95.71% <0%> (ø) ⬆️
... and 46 more

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 08b67a7...d9315d0. Read the comment docs.

@jacekkarczmarczyk jacekkarczmarczyk added this to the v1.3.x milestone Oct 19, 2018
@jacekkarczmarczyk jacekkarczmarczyk added the T: bug Functionality that does not work as intended/expected label Oct 19, 2018
@johnleider johnleider merged commit 4010fe4 into vuetifyjs:master Oct 23, 2018
nekosaur pushed a commit that referenced this pull request Oct 26, 2018
* Fix #5316

In 24hr mode, when clicking on the left part of `12`, `23` was selected

* Add unit test for 13903ac4
@lock
Copy link

lock bot commented Apr 14, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

@lock lock bot locked as resolved and limited conversation to collaborators Apr 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Time Picker: Wrong hour selected in 24hr mode
3 participants