scrumlr.io
scrumlr.io copied to clipboard
refactor: replace intersection observer in board
Description
Replaces the intersection observer used to determine whether the board is scrollable and which column to show. Reasons:
- this is part of a larger refactor of the board and column component
- the code was clunky
- using a hook is more readable and reusable
- the tests wouldn't work with a higher TS version so not requiring them keeps us out of trouble
Changelog
- add hook
useIsTouchingSides
- remove
IntersectionObserver
and all surrounding logic from Board - change board scroll logic
Checklist
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] The application was tested in the most commonly used browsers (e.g. Chrome, Firefox, Safari)