tmort / Socialite

Other
1.68k stars 163 forks source link

Fix for backup link #11

Closed jimmynotjim closed 12 years ago

jimmynotjim commented 12 years ago

Fixed Example CSS to show socialite-button div and link as a backup when visitor has blocker enabled

dbushell commented 12 years ago

Thanks, I'll give it a quick test and pull it in. I'll have to remember my original reasoning when making the demo...

jimmynotjim commented 12 years ago

No worries, I'm still trying to find a way around it. So far only a crazy hair brained idea of having two elements, one w/ the button background, one set up w/ socialite. Then absolutely position them within an

  • so that both buttons line up on top of each other after the script runs. Not really an ideal fix. I noticed it's an issue on google's internal sites too, so it may not be worth chasing down.

  • dbushell commented 12 years ago

    In regards to a failsafe should domains be blocked it may be possible to do a quick "ping" before Socialite attempts to replace the button. At the moment the script just dives right in. The right combination of "initialising", "loading" and "loaded" classes could give CSS enough to style all outcomes.

    On another note, It would be nice to throw up quite a few examples of possible implementations. The core of Socialite is the JS loader, so the actual CSS of the defaults is a choice left to the developer. One reason for this is an issue that was mentioned to me regarding multi-language support. The Japanese "Tweet" button for example is a lot larger than the English one. Therefore any fixed size CSS is going to cause problems.

    dbushell commented 12 years ago

    Apologies, I didn't get around to fixing the demo but thanks for the input. Version 2 has changed the classes used, though it doesn't solve this issue with blockers.

    Since blockers are "opt-in" I'd asume users would rather share manually their own way (if at all). Maybe they don't like seeing a list of sharing suggestions, even if it's just default links rather than actual iframe buttons.

    That said, a solid demo that includes this fallback wouldn't harm...

    jimmynotjim commented 12 years ago

    I agree that not showing anything at all might be better since those using blockers probably don't want to see them. My opinion on share widgets is moving towards that of the latest IA article. I just hate seeing a design that does use them break down when they're blocked. For now I'll probably just let them fall where they may and see where we end up.

    dbushell commented 12 years ago

    Oh definitely! I agree fully with the IA article. Trouble is, with client work and potential "social media experts" around every corner sometimes it's an argument you'll never win. I made Socialite to avoid ruining the whole experience ;)

    As for a more intelligent fallback that works with blockers, it's a tricky decision because so many people are already copying the socialitejs.com implementation verbatim, even with attributes to @dbushell :/ A bit annoying but I suppose inevitable. For that reason I don't want to include too much CSS, rather let the developer figure it out.