npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@html-next/vertical-collection

v4.0.2

Published

infinite-scroll, done right. done.

Downloads

137,136

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

ember install @html-next/vertical-collection

Usage

<VerticalCollection
    @items={{items}}
    @tagName="ul"
    @estimateHeight={{50}}
    @staticHeight={{false}}
    @bufferSize={{1}}
    @renderAll={{false}}
    @renderFromLast={{false}}
    @idForFirstItem={{idForFirstItem}}
    @firstReached={{firstReachedCallback}}
    @lastReached={{lastReachedCallback}}
    @firstVisibleChanged={{firstVisibleChangedCallback}}
    @lastVisibleChanged={{lastVisibleChangedCallback}}
     as |item i|>
    <li>
      {{item.number}} {{i}}
    </li>
</VerticalCollection>

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 Matrix

| vertical-collection version | Supported Ember versions | Supported Node versions | | ----------------------------- | ------------------------ | ----------------------- | | ^v1.x.x | v1.12.0 - v3.8.x | ? | | ^v2.x.x | v2.8.0 - v3.26.x | v12 - ? | | ^v3.x.x | v2.18.0+ | v14+ | | ^v4.x.x | v3.12.0+ | v14+ |

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, vertical-collection 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>)
  • PR against master (default branch).

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

License

This project is licensed under the MIT License.