Skip to content
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

dependencies - the plugin is not lightweight #298

Open
neuropass opened this issue Mar 10, 2016 · 4 comments
Open

dependencies - the plugin is not lightweight #298

neuropass opened this issue Mar 10, 2016 · 4 comments

Comments

@neuropass
Copy link

Hi,
I noticed there are still many dependencies and saying that the plugin doesn't add overhead its not quite true. Iwould argue the opposite in fact.

for example ,the lato font @import is a terrible practice and its not useful to anyone just to add a "share" text. it should not be part of the default css for sure.

regarding the script, 60kb is not what I consider lightweight. 29, minified still not lightweight.
it seems that you can use the plugin if you select the code from line 634 to 1563 so why not to just break it down fro production and explain these things better?

@kylemac
Copy link
Contributor

kylemac commented Mar 10, 2016

@neuropass if you're willing to help slim it down - we'd very likely be open to a PR

@neuropass
Copy link
Author

I would If I had the knowledge. I like the plugin but saying its lightweight , no overhead etc etc is simply not true. less experienced users are installing this thinking is some great addon. it is but comes with a cost on your web page. I dont think you can ignore this. Lato font alone is not needed. all that JS is it really needed to create a simple share button? what's the logic behind it?

@kylemac
Copy link
Contributor

kylemac commented Mar 10, 2016

@neuropass you'll have to show me where were are billing it as "no overhead etc etc". we don't use that language in the readme anywhere. if i had to guess you're referring to where we say "Simple, light, flexible, and good-looking share button" - which I don't feel is a stretch.

I agree in principle the Lato font is not required. Perhaps we'll make it optional someday. We'll be sure to ping you if we do end up addressing your concerns in the future.

@hhsnopek
Copy link
Contributor

Just to chime in; in share-button's current state we've added the ability for users to integrate the button in various ways and allow a lot more customization than previous versions. Regarding how lightweight share-button is, well that's left to one's opinion. I do agree that it's current state isn't the lightest, but some people will consider jquery to be light and that's pretty big. Tho in the end we have trade-offs, the reason we jumped in size so much between v0.5.0 & v1.0.3 is due to the switch from coffeescript & babel, this is due to everything that goes into transpiling. If you wanted the lighter version, I'd recommend going with v0.5.0, but be aware that it comes with the downside of less customization. In the future I'd like to have the ability to have a couple options for building share-button, like no polyfills or removal of collision-detection, these were features that the community requested, but not everybody uses them. In the end if you want to cut down on everything, you have the ability to customize the button and completely remove lato, you just need to clone it down and compile your changes 😄

Here's the size comparisons between v1.0.3 & v0.5.0

v1.0.3 size
share-button.css 31.2 KB
share-button.js 65 KB
share-button.min.css 30.1 KB
share-button.min.js 29.2 KB
v0.5.0 size
share.js 20.6 KB
share.min.js 15.2 KB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants