kni-labs / rrssb

:arrow_right_hook: Ridiculously Responsive Social Sharing Buttons
https://rrssb.netlify.com/
MIT License
3.4k stars 424 forks source link

rrssb 2.0 outline #113

Open dbox opened 9 years ago

dbox commented 9 years ago

https://github.com/kni-labs/rrssb/tree/2.0

Note: This is a full version update and will have breaking changes. 1.x.x will also still be available.

AdamPS commented 9 years ago

D'oh sorry - thanks!

connorwyatt commented 9 years ago

Strange, I'll look into ajax/iphone issues and see what I can find

connorwyatt commented 9 years ago

Right. I have sorted the share count now, but as you will see, it is showing 1792 shares for the page because facebook thinks there have been 1792 shares...

http://graph.facebook.com/?id=http://connorwyatt.github.io/rrssb/

Any ideas how to fix this? I assume it will work on actual sites but I dont know what's going wrong

connorwyatt commented 9 years ago

Here is the link again if you need it http://connorwyatt.github.io/rrssb/

dbox commented 9 years ago

Same # as this: http://graph.facebook.com/?id=http://kurtnoble.com/labs/rrssb

connorwyatt commented 9 years ago

Strange... It is definitely using the connorwyatt.github url

dbox commented 9 years ago

Yeah, not sure why it's mirroring. Clearly the tool works: http://graph.facebook.com/?id=http://google.com

Which brings up a point about how we're going to handle the width of .rrssb-count. I think inline block is good, but we'll need it to push the other content over. I can help you with the styling of that whenever we pull your code in.

connorwyatt commented 9 years ago

It is working then, I’ll continue as it is

On 22 May 2015, at 15:26, Daniel Box notifications@github.com wrote:

Same # as this: http://graph.facebook.com/?id=http://kurtnoble.com/labs/rrssb http://graph.facebook.com/?id=http://kurtnoble.com/labs/rrssb — Reply to this email directly or view it on GitHub https://github.com/kni-labs/rrssb/issues/113#issuecomment-104673597.

connorwyatt commented 9 years ago

The width is done by adding a style of calc(100% - 50px) to the rrssb icons container

connorwyatt commented 9 years ago

only if there is a count though

dbox commented 9 years ago

I think the facebook one is referencing the meta information instead of the actual url

connorwyatt commented 9 years ago

It can't be, open up your console and you will see that all the share counts are for the connorwyatt.github url

dbox commented 9 years ago

Yeah, I deleted the facebook url meta and uploaded to another server and it's still doing it: http://dbox.us/rrssb2/

dbox commented 9 years ago

But doesn't do it locally

connorwyatt commented 9 years ago

Yeah my local one is showing 223

connorwyatt commented 9 years ago

It's only facebook too

connorwyatt commented 9 years ago

on the github pages one

dbox commented 9 years ago

Seems like there has to be something that's associating it specifically with kurtnoble.com/labs/rrssb

connorwyatt commented 9 years ago

Yeah definitely, I'll carry on going as I am and will have a look at some point

dbox commented 9 years ago

The width is done by adding a style of calc(100% - 50px) to the rrssb icons container

But if its a very long number it wont fit. Ideally the text should determine the width. But I can look into that part.

connorwyatt commented 9 years ago

That’s just for now, I’m planning to make it so that if it is long it will show 5K or 5M etc

On 22 May 2015, at 19:56, Daniel Box notifications@github.com wrote:

The width is done by adding a style of calc(100% - 50px) to the rrssb icons container

But if its a very long number it wont fit. Ideally the text should determine the width. But I can look into that part.

— Reply to this email directly or view it on GitHub https://github.com/kni-labs/rrssb/issues/113#issuecomment-104743328.

dbox commented 9 years ago

ah. perfect.

connorwyatt commented 9 years ago

;)

On 22 May 2015, at 19:58, Daniel Box notifications@github.com wrote:

ah. perfect.

— Reply to this email directly or view it on GitHub https://github.com/kni-labs/rrssb/issues/113#issuecomment-104743895.

connorwyatt commented 9 years ago

There you go, my github pages version has the K and M functionality now

dbox commented 9 years ago

@connorwyatt Did you want me to pull into 2.0 or do you want to get a little further first?

connorwyatt commented 9 years ago

You can pull it in just let me check whether I need to push anything up.

I haven’t done anything with the sizing of the buttons yet so that is the next job that needs doing.

On 27 May 2015, at 18:34, Daniel Box notifications@github.com wrote:

@connorwyatt https://github.com/connorwyatt Did you want me to pull into 2.0 or do you want to get a little further first?

— Reply to this email directly or view it on GitHub https://github.com/kni-labs/rrssb/issues/113#issuecomment-106006557.

bboerendans commented 9 years ago

The thing why http://graph.facebook.com/?id=http://connorwyatt.github.io/rrssb/ and http://graph.facebook.com/?id=http://kurtnoble.com/labs/rrssb is giving the same count is that in both pages the meta property="og:url" have the same url :)

dbox commented 9 years ago

@bboerendans That's what we thought too but I put a page up with no og:url meta and it's still doing it: http://dbox.us/rrssb2/

connorwyatt commented 9 years ago

Yeah we checked that @bboerendans and it’s not that, I have no idea what to do with it but I’ll look into it.

No URL is hard coded into the js so I can’t see why it’s playing up

On 28 May 2015, at 13:26, Daniel Box notifications@github.com wrote:

@bboerendans https://github.com/bboerendans That's what we thought too but I put a page up with no og:url meta and it's still doing it: http://dbox.us/rrssb2/ http://dbox.us/rrssb2/ — Reply to this email directly or view it on GitHub https://github.com/kni-labs/rrssb/issues/113#issuecomment-106295026.

dbox commented 9 years ago

I have an idea. Standby On Thu, May 28, 2015 at 7:40 AM Connor Wyatt notifications@github.com wrote:

Yeah we checked that @bboerendans and it’s not that, I have no idea what to do with it but I’ll look into it.

No URL is hard coded into the js so I can’t see why it’s playing up

On 28 May 2015, at 13:26, Daniel Box notifications@github.com wrote:

@bboerendans https://github.com/bboerendans That's what we thought too but I put a page up with no og:url meta and it's still doing it: http://dbox.us/rrssb2/ http://dbox.us/rrssb2/ — Reply to this email directly or view it on GitHub < https://github.com/kni-labs/rrssb/issues/113#issuecomment-106295026>.

— Reply to this email directly or view it on GitHub https://github.com/kni-labs/rrssb/issues/113#issuecomment-106297978.

dbox commented 9 years ago

@connorwyatt. Thanks! If you could bring in the current resizing that would be best.

dbox commented 9 years ago

@bboerendans @connorwyatt. Haha. So we were all right about the og-title. When I originally uploaded it, it had the og-title, then I took it off. Evidently all it takes is seeing it once and it caches it, even if you remove.

http://www.dbox.us/rrssb/

@connorwyatt - I think it's safe to assume script is all good. :)

connorwyatt commented 9 years ago

Cool, I would have been absolutely stumped otherwise.

Seems like a strangely permanent system though!

On 28 May 2015, at 15:04, Daniel Box notifications@github.com wrote:

@bboerendans https://github.com/bboerendans @connorwyatt https://github.com/connorwyatt. Haha. So we were all right about the og-title. When I originally uploaded it, it had the og-title, then I took it off. Evidently all it takes is seeing it once and it caches it, even if you remove.

http://www.dbox.us/rrssb/ http://www.dbox.us/rrssb/ @connorwyatt https://github.com/connorwyatt - I think it's safe to assume script is all good. :)

— Reply to this email directly or view it on GitHub https://github.com/kni-labs/rrssb/issues/113#issuecomment-106328327.

dbox commented 9 years ago

https://developers.facebook.com/tools/debug/og/object/

dbox commented 9 years ago

@connorwyatt You still working on stuff?

connorwyatt commented 9 years ago

Hi @dbox, at the minute I'm not as I've just started a new job, it's currently in a state where it loads the svgs using ajax and you can use it via jquery, it just doesn't resize.

Feel free to add in the resizing functions, the old ones should be fine, you would just need to change element names and classes. Otherwise I won't get round to it in the next month and it might be longer.

-------- Original message -------- From: Daniel Box notifications@github.com Date:19/06/2015 16:17 (GMT+00:00) To: kni-labs/rrssb rrssb@noreply.github.com Cc: Connor Wyatt cw@connorwyatt.io Subject: Re: [rrssb] rrssb 2.0 outline (#113)

@connorwyatt You still working on stuff?

— Reply to this email directly or view it on GitHub.

adamschwartz commented 9 years ago

Hey @dbox, I really dig what y’all have built. I’m wondering if in 2.0 you might consider dropping jQuery as a dependency?

If you wanted to still support $.fn.rrssb you could bring that in if jQuery is detected. That way the advantages of using it with jQuery could be maintained while still allowing it to be used by websites which don’t use jQuery.

I’d be happy to help out if this is something you’re interested in doing.

AdamPS commented 9 years ago

So is your long term plan to drop v1.0?

I entered the debate further up the thread from the perspective of the co-maintainer of the Drupal integration. I don't want to rerun the discussion again, but just a quick summary. I can see that the drop-in zero integration option is attractive to many people. But having the js generate the content is somewhat breaking the CMS model. With v1.0, the HTML in Drupal starts off as an array and gradually gets expanded to the final HTML, with dozens of opportunities for customisation via hooks, templates, translations etc. Some people are using these. Also I believe our users are attracted by the fact the V1 module doesn't download a separate file per image - it is much more lightweight than comparable Drupal modules. I know, you said V2.0 is super fast on a modern developer PC, but maybe it makes a difference over a slow broadband. Certainly there are plenty of articles that say a single file is better performance. I have a prototype roughly working with Drupal auto-generating a CSS file with SVGs as background images (hence better caching compared with inline SVG) although unfortunately can't do the micro format at the moment, so maybe I need to look at other ideas.

So net of all that is that I'm not sure how v2.0 would fit into the Drupal module. Do you think there is any way that the two approaches can live side-by-side in the same project? Clearly there is a fair overlap. Or if we aren't sure about v2.0 would you suggest that we fork and go our own way? I don't know what the original author of the Drupal module would say - maybe he would be more happy about the new V2.0 approach, but it's less good for my websites.

I can potentially help if we can find the side-by-side approach. Although I mostly do php/CSS, and don't know much javascript, so I might not have the skills you are looking for.

dbox commented 9 years ago

@adamschwartz Personally, I don't mind dropping it as I don't do the JS updates. Would need to run by @joshuatuscan and @connorwyatt. I guess I'd just need to see some data on what % of people use jquery and what the ramifications of removing it are.

dbox commented 9 years ago

@AdamPS 1.x will still be available, but I doubt we'll maintain it to the level that 2.0 will be. Definitely happy to have rrssb-drupal and rrssb-wp forks off the main repo, but I personally have zero interest in maintaining all the different versions. At a certain point, people like to build things differently, and that's okay!

AdamPS commented 9 years ago

@dbox Great, thanks it will help to have 1.0 around still. I can understand it would be less well maintained. Any updates to SVG files would perhaps be a really useful thing to transfer across and hopefully really easy to do as the files will stay in sync.

adamschwartz commented 9 years ago

@dbox I’m not sure why jQuery usage data would be necessary. Removing jQuery as a dependency would allow more people to use it, not fewer. That being said, the development time to remove it as a dependency (and continue to maintain it that way) is certainly real, but I’d be happy to help out there.

@joshuatuscan @connorwyatt thoughts?

dbox commented 9 years ago

I just meant if 99% of people are using it, then probably not worth the refactor, but I'm game.

We just gotta port those resize functions over first.

On Fri, Jul 24, 2015 at 11:46 AM Adam Schwartz notifications@github.com wrote:

@dbox https://github.com/dbox I’m not sure why jQuery usage data would be necessary. Removing jQuery as a dependency would allow more people to use it, not fewer. That being said, the development time to remove it as a dependency (and continue to maintain it that way) is certainly real, but I’d be happy to help out there.

— Reply to this email directly or view it on GitHub https://github.com/kni-labs/rrssb/issues/113#issuecomment-124576647.

adamschwartz commented 9 years ago

Ahhh, I see, my mistake.

Yeah, as co-creator of YMNNJQ I may be just a tad biased ;), but when a library can do everything it wants without jQuery, I typically advocate it. And like I said, I’d be happy to help out as I see it being very beneficial here. IMHO, a typical blog wouldn’t need jQuery since it’s just displaying static posts. Things like comments can be handled by Disqus, and Social Sharing can be handled by RRSSB :). One thing that drew me to RRSSB from the beginning was how lightweight it was as compared many other similar tools out there. At the time I didn’t realize that jQuery was a dep though. With jQuery added in, RRSSB’s size is an order of magnitude larger. Anywho, sorry again for my earlier confusion.

AdamPS commented 9 years ago

From the Drupal perspective, jQuery will very likely be loaded anyway. But there is a certain amount of hassle to get v10 that is required here - the default is lower.

joshuatuscan commented 9 years ago

I think it’s a good idea to abandon jQuery as a dependency. Originally it was for speed and banking on the fact that most people will have jQuery running on their site already, however, vanilla JS would be better and I’m for it.

Like Daniel said, just need to port the functions away from using it.

On Jul 24, 2015, at 10:40 AM, Adam Schwartz notifications@github.com wrote:

Ahhh, I see, my mistake.

Yeah, as co-creator of YMNNJQ http://youmightnotneedjquery.com/ I may be just a tad biased ;), but when a library can do everything it wants without jQuery, I typically advocate it. And like I said, I’d be happy to help out as I see it being very beneficial here. IMHO, a typical blog wouldn’t need jQuery since it’s just displaying static posts. Things like comments can be handled by Disqus, and Social Sharing can be handled by RRSSB :). One thing that drew me to RRSSB from the beginning was how lightweight it was as compared many other similar tools out there. At the time I didn’t realize that jQuery was a dep though. With jQuery added in, RRSSB’s size is an order of magnitude larger. Anywho, sorry again for my earlier confusion.

— Reply to this email directly or view it on GitHub https://github.com/kni-labs/rrssb/issues/113#issuecomment-124594018.

adamschwartz commented 9 years ago

@AdamPS a great example of why dep management on the web is so hard. :+1:

@joshuatuscan awesome! Let me know if I can help at all.

dbox commented 9 years ago

Checklist at the top of this thread has been updated with some tasks:)

This one is the main priority right now:

Port resize functions from 1.x - @joshuatuscan / anyone else who can help

Not sure about @joshuatuscan's current availability, so if anyone else can dive in and help feel free!

dbox commented 9 years ago

Btw, 2.0 is DELIGHTFUL to work on thanks to all @connorwyatt's work on the gulp/browsersync setup.

dbox commented 9 years ago

Pinging to see availability on 2.0 work. @joshuatuscan you around at all? Anyone else want to dive in here? I'm currently slammed but would like to get 2.0 out the door if possible. I can help but can't take on the porting of resizing functionality.