GithubHelp home page GithubHelp logo

illume's People

Contributors

jackjennings avatar skwak avatar

Watchers

 avatar  avatar  avatar

illume's Issues

Replace jQuery calls

Some attributes are being read using jQuery (done for expediency when this was originally written). These should be replaced with vanilla JS calls to eliminate the jQuery dependency.

  • calls to height and scrollTop of window
  • determining the offset of an element
  • reading data attributes

Replacing jQuery with a few smaller dependencies would also be fine.

Change argument to a collection of DOM nodes

After using this in a few projects, it seems like it would be a better API if the function accepted a collection of DOM elements, rather than a data attribute. The active and inactive streams would then also be updated to emit elements, rather than "names".

Benefits:

  • Delegate querying elements to the parent program. This allows any group of elements to be used, and doesn't force the data-attribute approach currently being used. This also means that we can remove the dependency on @standard-library/q-prime.
  • Reduced querying—if the collection of nodes is already available in the parent program, the DOM query currently in the function is duplicative. Also, by only returning a "name", doing anything with that active "name" mean performing another query to get the DOM nodes.

Issues:

  • The function currently takes names instead of elements in order to return only unique names (and to remove duplicates if there are elements with the same name). If this argument is changed and retaining this behavior is desired, another argument might need to be supplied, e.g.:
illume(nodes, { uniqueBy: node => node.dataset.name })

Exchange q for q'

Instead of using @artcommacode/q, use the VASTLY superior @standard-library/q-prime.

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.