-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new Feature: Flaps #304
new Feature: Flaps #304
Conversation
Hey Marcel, I cloned your branch and tried it out. This is really cool! I experimented with it in different ways and was impressed with how well it held up. The animation looks great, and I like how you handled separators. However, rather than merge this directly into CountUp, I would like to propose an alternative: that CountUp support plugins, and you create a separate repo and npm package for just your plugin code. Let me explain my thinking:
As part of supporting plugins, I would like to call out each available plugin in the README of CountUp with a sample image, explanation, package name and author credit. I would also add an explanation of how to use it. So, I think it's a win-win - you get credit for your work, and I don't have to maintain this code or ship it for users that aren't using it. Finally we can allow for more animation styles to be added later. I would like to proceed this way: I will design an API for plugins, based on how you have hooked into CountUp. We can collaborate how best to do this. I'm thinking the plugin package will export a render function that will get invoked instead of printValue. For users who just want to use CountUp as-is, there will be no change, but for plugins, they will install your plugin, and pass it as an option to CountUp. I will start a discussion in this repo and tag you. Once we have the plugin design figured out, you can publish your plugin, and I will link it in the README with a new release of CountUp. I'm thinking it will be minor because there will be no breaking changes. Sound good? |
Agree, it's a way to enhance the capabilities of the library. Well, precisely I needed the basic fundamentals of a counter to create a numerical animation. So it can happen to other programmers like me. I'll be waiting for when the first API draft is ready, and I'll provide any suggestions if I see it necessary. Of course I will try to make my plugin work the same as now with the new API.
Nice information, I will eventualy change the name to odometer or barrel. Thanks! |
Thanks Marcel, take a look at the discussion here - I've proposed an api. #306 |
Closing this so we can proceed with the plugin architecture. Plugins are now supported in 2.6.0: #307 Please create your plugin package, and I will update the readme with a link to it! |
I'm submitting a new feature
Checklist
Description
Flap digits are now possible in counter.js
The number digits (comma separator are affected too) are represented like vertical flaps appearing from bottom. You can choose the animation time and the last digit delay time.
The changes are incorporated in demo and readme.
Does this PR introduce a breaking change?