-
Notifications
You must be signed in to change notification settings - Fork 975
Use different distance thresholds for axis X and Y #12434
Conversation
fix #9615 Auditors: @bsclifton Test Plan: 1. Adjust swipe navigation sesitivity setting in about:preferences#advanced 2. And swipe to navigate by different settings
@@ -252,12 +252,13 @@ class Main extends React.Component { | |||
}, { passive: true }) | |||
|
|||
ipc.on('scroll-touch-end', () => { | |||
const distanceThreshold = getSetting(settings.SWIPE_NAV_DISTANCE) | |||
const distanceThresholdX = getSetting(settings.SWIPE_NAV_DISTANCE) | |||
const distanceThresholdY = 101 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this 101 value come from? It might be a good idea to make it a constant, since here it appears to be a magic number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is the default value of SWIPE_NAV_DISTANCE
, are you suggesting make it into settings constant? We don't allow users to config it so why bother?
https://github.com/brave/browser-laptop/pull/12434/files#diff-de5d4f1b019deecc5b1926970450546cR257 here doesn't appear to be magic number to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok- good to know that it's the default value 😄 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
Use different distance thresholds for axis X and Y
Use different distance thresholds for axis X and Y
Codecov Report
@@ Coverage Diff @@
## master #12434 +/- ##
==========================================
+ Coverage 55.86% 55.95% +0.08%
==========================================
Files 278 278
Lines 26936 27460 +524
Branches 4355 4572 +217
==========================================
+ Hits 15048 15365 +317
- Misses 11888 12095 +207
|
fix #9615
Auditors: @bsclifton
Test Plan:
about:preferences#advanced
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests