Giter Club home page Giter Club logo

helix's People

Contributors

vhmth avatar

Stargazers

 avatar

Watchers

 avatar  avatar

helix's Issues

Bower Integration

Add a bower file and publish via bower. Probably a much later task after the library is ready for widespread use.

Handle Short Model Supply

If requestModels supplies an array of models shorter than the range requested, the Helix instance could do one or more of these things:

Assume it has reached the end of the scroll range and will not request models past the last model index supplied.
Remove all cache entries for elements past the last index supplied if an internal height cache is being maintained.
Subtract height from the bottom or top "stub" element as necessary.
This is an edge case we can deal with later.

Prefetch Semantics

cvuong we agreed there would be prefetch options. I was thinking there could be granularity over how many items to prefetch below and after the viewport, but it may make more sense to just have one option and assume it applies in both directions. So:

prefetch: NUM_ITEMS_TO_PREFETCH // defaults to 10
An example logic model (from initialization):

Request prefetch models.
Request element for each of the models supplied.
Fill the viewport with element.
We do steps 2 & 3 until the viewport is full or the models are used. If the models are all used, we start at step 1 again. If not:

Add leftover models to bottom prefetch cache (if there are any left).
Request models until prefetch caches are full (top and bottom cache).

Test Suites

Test suite for internal module functionality. Probably with something like mocha and grunt.

Height Cache Maintenance

If there was a height cache being maintained and setElementHeight is called, we should destroy the cache. If all heights were assumed to be static and setElementHeightAtIndex is called, degrade to calculating heights on the fly.

Export Gracefully

Handle either AMD, CJS or window global export based on how someone builds. Building should result in three files:

dist/global/helix.js
dist/amd/helix.js
dist/cjs/helix.js

A catch-all export could be a nice alternative well (code in coffeescript):

if typeof module is 'object' and typeof module.exports is 'object'
  module.exports = Helix
else if typeof define is 'function' and define.amd?
  define('helix', [], -> return Helix)
else
  window.Helix = Helix

Loading View

We should allow for the option of a view to be inserted at the top/bottom of the viewport when we're waiting on all models to finish being fetched.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.