Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@html-next/vertical-collection

Package Overview
Dependencies
Maintainers
4
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@html-next/vertical-collection

infinite-scroll, done right. done.

  • 1.0.0-beta.14
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28K
decreased by-31.26%
Maintainers
4
Weekly downloads
 
Created
Source

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

ember install @html-next/vertical-collection

Usage

{{#vertical-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>
{{/vertical-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 Ember community on Discord

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

  • Open an Issue for discussion first if you're unsure a feature/fix is wanted.
  • Branch off of master (default branch)
  • Use descriptive branch names (e.g. <type>/<short-description>)
  • Use Angular Style Commits
  • PR against master (default branch).

Commits

Angular Style commit messages have the full form:

<type>(<scope>): <title>

<body>

<footer>

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

<type>(<scope>): <title>

Examples:

  • chore(deps): bump deps in package.json and bower.json
  • docs(component): document the fast-action component

Testing

Make sure you register the test waiter from ember-raf-scheduler. So ember-test-helpers's wait is aware of the scheduled updates.

An example can be found here

Keywords

FAQs

Package last updated on 03 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc