-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fixes #8256 #8259
Fixes #8256 #8259
Conversation
Oops... linting rules workspace collision... |
Huh for some reason I can't get the benchmarks to run, even on master... running out of memory. |
nm it worked |
@@ -12,7 +12,8 @@ There are two test suites associated with Mapbox GL JS | |||
|
|||
To run individual tests: | |||
|
|||
- Unit tests: `yarn test-unit path/to/file.test.js` where the path begins within the `/test/unit/` directory | |||
- Unit tests: `yarn test-unit path/to/file.test.js` where path *does not include* `test/unit/` | |||
- e.g. `yarn test-unit ui/handler/scroll_zoom.test.js` |
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.
I found this instruction confusing, took me a while to realize that I needed to not include /test/unit/ in the test path to be able to run a test.
@@ -148,5 +149,93 @@ test('ScrollZoomHandler', (t) => { | |||
t.end(); | |||
}); | |||
|
|||
t.test('emits one movestart event and one moveend event while zooming', (t) => { |
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.
I confirmed that these tests would fail on master without the scroll_zoom update.
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.
I'll let @ryanhamley take a second quick 👀 but this looks great to me! Thanks for the thorough fix with tests.
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.
Thanks!
Launch Checklist
This PR is to fix #8256. By wrapping the movestart event emitter in a check to see if
_zooming
has already started, it will only fire once.This affects both movestart and zoomstart, both of which suffered from the problem outlined in the issue.
document any changes to public APIspost benchmark scores<-- couldn't get these to runtagged@mapbox/studio
and/or@mapbox/maps-design
if this PR includes style spec changestagged@mapbox/gl-native
if this PR includes shader changes or needs a native port