html-next/vertical-collection

Name: vertical-collection

Owner: HTMLNext

Description: Infinite Scroll and Occlusion at > 60FPS

Created: 2016-10-28 14:19:26.0

Updated: 2018-01-18 15:16:45.0

Pushed: 2018-01-18 20:45:55.0

Homepage: https://html-next.github.io/vertical-collection/

Size: 2238

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

vertical-collection

Greenkeeper badge

Build Status

Infinite Scroll and Occlusion at > 60FPS

vertical-collection is an ember-addon that is part of the smoke-and-mirrors framework. It focuses on improving initial and re-render performance in high-stress situations by providing a component for performant lists and svelte renders to match a core belief: Don't render the universe, render the scene.

TL;DR svelte render: the fewer things you need to render, the faster your renders will be.

Your web page is a universe, your viewport is the scene. Much like you wouldn't expect a video game to render out-of-scene content, your application should smartly cull the content it doesn't need to care about. Trimming excess content lets the browser perform both initial renders and re-renders at far higher frame-rates, as the only content it needs to focus on for layout is the content the user can see.

vertical-collection augments your existing app, it doesn't ask you to rewrite layouts or logic in order to use it. It will try its best to allow you to keep the conventions, structures, and layouts you want.

Install
r install @html-next/vertical-collection
Usage
ertical-collection
items
tagName='ul'
estimateHeight=50
staticHeight=false
bufferSize=1
renderAll=false
renderFromLast=false
idForFirstItem=idForFirstItem
firstReached=firstReached
lastReached=lastReached
firstVisibleChanged=firstVisibleChanged
lastVisibleChanged=lastVisibleChanged
 as |item i|}}
<li>
  {{item.number}} {{i}}
</li>
ertical-collection}}
Actions

firstReached - Triggered when scroll reaches the first element in the collection

lastReached- Triggered when scroll reaches the last element in the collection

firstVisibleChanged - Triggered when the first element in the viewport changes

lastVisibleChanged - Triggered when the last element in the viewport changes

Support, Questions, Collaboration

Join the smoke-and-mirrors channel on Slack.

Slack Status

Features
Infinite Scroll (bi-directional)

Infinite scroll that remains performant even for very long lists is easily achievable with the vertical-collection. It works via a scrollable div or scrollable body.

Svelte Everything

If it can be trimmer, smoke-and-mirrors likes to trim it.

Status

Changelog

Build Status dependencies devDependency Status Coverage Status

Documentation

For updated documentation and demos see http://html-next.github.io/vertical-collection/

Contributing
Commits

Angular Style commit messages have the full form:

pe>(<scope>): <title>

dy>

oter>

But the abbreviated form (below) is acceptable and often preferred.

pe>(<scope>): <title>

Examples:

Funding

OSS is often a labor of love. Smoke And Mirrors is largely built with that love.

Click here to lend your support to: Smoke-and-mirrors: Ambitious infinite-scroll and svelte rendering for Ember applications and make a donation at pledgie.com !


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.