-
Notifications
You must be signed in to change notification settings - Fork 6
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
➕ [#2176] added gesture handling for leaflet #519
Conversation
1c12426
to
022d2f5
Compare
022d2f5
to
a25bfd2
Compare
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.
Some more general remarks:
- Wrong default language - WCAG 3.1.2 failure elmarquis/Leaflet.GestureHandling#86 -> when switching the language in storybook, I'm only seeing English messages and never Dutch, that's wrong behaviour
- There's not a lot of activity in the library/repository, so this is a bit of a risk 🤔 if it works well, we can accept the risk
- two finger drag / page scroll prevention and glitchy panning elmarquis/Leaflet.GestureHandling#65 is concerning, have you seen similar behaviour?
5a5970e
to
22eec73
Compare
|
22eec73
to
a2a2220
Compare
a2a2220
to
3add74e
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #519 +/- ##
==========================================
+ Coverage 46.56% 46.59% +0.03%
==========================================
Files 198 198
Lines 3518 3520 +2
Branches 632 632
==========================================
+ Hits 1638 1640 +2
Misses 1716 1716
Partials 164 164
☔ View full report in Codecov by Sentry. |
If we were to use the Map outside of React, then the gesture handling is available and easily enabled. This also refactors enabling the handling directly in the map container rather than relying on a useEffect call.
Cleaned up a little bit to register the handler globally and enable it via option so we don't need the component with side-effect. Tested on mobile with storybook and the panning/dragging is smooth for me too. |
Fixes open-formulieren/open-forms#2176