Git Product home page Git Product logo

fizzy-ui-utils's People

Contributors

desandro avatar jakewisse avatar yoshitakaoshima avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fizzy-ui-utils's Issues

MIT License Page

Hi @desandro:

Your copyright notice and the MIT license text are not contained on GitHub but on a separate MIT license page (http://desandro.mit-license.org/). This actually poses a problem for automated FOSS compliance processes. While code scanners will pick up on the string 'MIT' in the README.md, your copyright notice will be systematically missed.

Would you please consider changing your license information so that your code can be more easily used in compliance with the license? A good method for declaring copyright and licensing is https://reuse.software.

window -> global breaks normal behavior

Issue

Upgrading to latest version of fizzy-ui-utils breaks normal behavior when bundling with parcel's latest version (2.3.2).

When building in production mode
Uncaught TypeError: e is undefined

When building in dev mode
No error but slider behaviour is wrong (see image)
image

As you can see dots disapeared and all slides appart from the 1st one is invisible with flickity-fade

Reproduction

Then init a flickity basic slider with the fade like this

let flkty = new Flickity(cells_container, {
    lazyLoad: 3,
    wrapAround: true,
    fade : true,
    adaptiveHeight: true,
    initialIndex: -1,
    prevNextButtons: false,
    autoPlay: true
});

p.s: I have fixed the Uncaught TypeError: e is undefined when building in production by changing the this to global in fizzy-ui-utils code.

Downgrading to [email protected] fixes the issues but then you need 2 fizzy-ui-utils versions

Thanks.

makeArray( null )

From 5644530#commitcomment-21357441

Hi, for some reason the change in "2.0.4" is breaking one of our tests. It turns out that on line https://github.com/metafizzy/fizzy-ui-utils/blob/master/utils.js#L202 if dataAttrElems is null, utils.makeArray( dataAttrElems ) will return an array of null: [null, null], thus at line https://github.com/metafizzy/fizzy-ui-utils/blob/master/utils.js#L210 elem.getAttribute( dataAttr ) throw an error since it will be evaluating null.getAttribute.
We have to lock the version of this module in our npm-shrinkwrap.json (not a direct dependency) to 2.0.3 to bypass the error.

modulo

I do not know English well

question
what work function(meton|property) modulo

`getParent()` doesn't support searching a tree not in the `document.body`

Encountered this issue when using Flickity in a React context, where the Flickity lazy loader's 'load' event listener was being processed after React had removed the DOM associated with the Flickity instance. The stack trace looks like this:

Uncaught TypeError: Cannot read property 'matches' of null
    at matchesSelector
    at Object.utils.getParent
    at Flickity.proto.getParentCell
    at LazyLoader.complete
    at LazyLoader.onload
    at LazyLoader.utils.handleEvent

Since the DOM that is being searched is no longer in the document, it reaches an element with no parentNode and throws this exception.

QTWeb 3.8.5 Javascript Error

Hi @desandro ,

I can totally imagine you have better things to do, but still thought I'll let you know this one:

I've taken on the task of creating PDFs from a website I built, that makes heavy usage of Flickity and Isotope. The library of choice for the PDF creation is wkhtmltopdf. They are using the browser QTWeb to render the page and convert it to a PDF. Here is a minimal example of the terminal command with javascript debugging enabled:

$ wkhtmltopdf --debug-javascript http://my-site.com/my-page/ test.pdf

It's working fine, except of this Javascript error:

Warning: undefined:0 TypeError: 'undefined' is not a function

...not very verbose, I know it's a pain ;)

To investigate where this error is coming from, I debugged the site as described here (the MAC version seems to be broken in Mojave, I'm using the windows version with Virtual Box).

It's actually coming from a function inside of fizzy-ui-utils/utils.js:

Screen Shot 2019-04-15 at 16 18 12

So the actual error is this:

TypeError: 'undefined' is not a function (evaluating 'elem.getAttribute( dataAttr )')

I would be very happy if you could take a look at this. It might be an easy fix, who knows...

Safari 5.1 Windows Type Error

I know this is an edge case, but this doesn't work in Windows Safari 5.1, there is this error in the console that stops it initialising.

image

It appears to be inside this function:


elems.forEach( function( elem ) {
      var attr = elem.getAttribute( dataAttr ) ||
        elem.getAttribute( dataOptionsAttr );
      var options;
      try {
        options = attr && JSON.parse( attr );
      } catch ( error ) {
        // log error, do not initialize
        if ( console ) {
          console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +
          ': ' + error );
        }
        return;
      }
      // initialize
      var instance = new WidgetClass( elem, options );
      // make available via $().data('namespace')
      if ( jQuery ) {
        jQuery.data( elem, namespace, instance );
      }
    });

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.