Giter VIP home page Giter VIP logo

Comments (9)

electerious avatar electerious commented on June 4, 2024

I think using class might not be the best choice here. You could export the main function directly.

Let me know if this is a welcome change, so I can take a closer look at it and open a PR.

from jump.js.

mgiulio avatar mgiulio commented on June 4, 2024

100% agree.
I have an article on Sitepoint in peer-review stage about smooth scrolling where I present a modified/refactored(that is, the core animation code is the same) version of Jump.js, and the above two suggestions by @electerious are two of the applied customizations.
Just my 0.02€,
mg

from jump.js.

callmecavs avatar callmecavs commented on June 4, 2024

@electerious @mgiulio you're both correct imo. all the options have sensible defaults, except the target and duration, which I'm fine with being required. I've been planning on a v1.0.0 release that removes the class structure, and uses the revealing module pattern, similar to my libraries I've updated/released recently. I'm certainly open to a pull request accommodating this change if either of you are up to it. otherwise, I plan on getting around to it soon.

@mgiulio also super interested in the sitepoint article! happy to see people referencing, analyzing, and otherwise thinking about my code. let me know if you have any questions, or would like to co-author something. cheers 🍻

from jump.js.

mgiulio avatar mgiulio commented on June 4, 2024

Hi @callmecavs , sorry for the late reply.

I'm too busy for a PR now but I could send you the draft, so you can see my code changes and review the article. Just let me know.

mg

from jump.js.

mgiulio avatar mgiulio commented on June 4, 2024

Hi @callmecavs, the article is out !

from jump.js.

callmecavs avatar callmecavs commented on June 4, 2024

please see #31

from jump.js.

callmecavs avatar callmecavs commented on June 4, 2024

also, @mgiulio - as i said on Twitter - fantastic article. really well written, and I appreciate you analyzing and writing about my work. please let me know what you'd like to see in v1.0.0!

from jump.js.

mgiulio avatar mgiulio commented on June 4, 2024

@callmecavs Glad you liked it!

Looking forward to v1.0.0.

I appreciate your efforts to revisit common UX patterns with vanilla JavaScript solutions. I've also enjoyed Layzr.

from jump.js.

callmecavs avatar callmecavs commented on June 4, 2024

@mgiulio much appreciated sir.

i follow the "3 strikes rule" - write the same code 3 times, on 3 different websites, and it should probably be an open source library. common UX patterns typically fall into this category - relevant and needed on every site (way more than 3)

everything i make comes about because of that rule and/or frustration with current libraries that address the problem im trying to solve. i appreciate all the support my libraries have gotten, and contributions from people like yourself.

This library (Jump) is actually my most depended on according to npm stats. so its only right i gather feedback from the community, and launch a proper v1.0.0, that incorporates what people want/need

from jump.js.

Related Issues (20)

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.