scrumlr.io icon indicating copy to clipboard operation
scrumlr.io copied to clipboard

refactor: replace intersection observer in board

Open Schwehn42 opened this issue 7 months ago • 3 comments

Description

Replaces the intersection observer used to determine whether the board is scrollable and which column to show. Reasons:

  1. this is part of a larger refactor of the board and column component
  2. the code was clunky
  3. using a hook is more readable and reusable
  4. 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)

Schwehn42 avatar Jul 06 '24 08:07 Schwehn42