github spaansba/ForesightJS V2.2
V2.2 ~ Prefetch On Scroll Prediction!

latest releases: V3.3.2, V3.3.1, V3.3.0...
4 months ago

Features

  • added a margin in the direction of the scroll in which prefetches will happen Playground
  • added enableScrollPrediction to toggle whether we should prefetch based on scroll
  • added scrollMargin to set the amount of px in scroll margin

Debugger Features

  • added green line to visualize the new scroll prefetching
  • added enableScrollPrediction and scrollMargin to the control panel
  • added sortElementList to sort the elements in the debugger control panel by "visibility", "insertionOrder" or "documentOrder" read more
  • added live tracker of the callback execution stats in the control panel. This will show you the amount of visible registered elements and the amount of callbacks ran with their type/subtype.

Changes

  • Tab Prediction got a big performance boost by caching tabbable elements and optimizing the index lookup algorithm. [read more here]
    (https://foresightjs.com/docs/Behind_the_Scenes)
  • Debugger info explanations are now a lot more detailed.
  • globalCallbackHits in the ForesightManager.instance.getManagerData static property now show total callback execution counts by interaction type (mouse/tab/scroll) and by subtype (hover/trajectory for mouse, forwards/reverse for tab, direction for scroll)
  • Renamed UpdateForsightManagerProps type to UpdateForsightManagerSettings
  • JSDocs are more detailed with links to actual docs
  • Now use translate3d instead of setting 'top' 'left' etc on debug elements to avoid reflow

Bug Fixes

  • Debugger callback animations now stick to the screen when scrolling

Docs

  • Docs are updated to V2.2
  • Every page in the docs is available in markdown format (try adding .md to any documentation URL e.g. https://foresightjs.com/docs/getting_started/config.md). You can share these markdown files as context with AI assistants. All these .md files are also consolidated in the llms.txt file.

Shoutout

Massive thanks to @thednp for the idea/implementation plan of the Scroll Prediction and performance suggestions to limit the amount of reflow.

Don't miss a new ForesightJS release

NewReleases is sending notifications on new releases.