patronage / bubs-timber

Gulp + Timber + WP
Other
5 stars 1 forks source link

New share share library? #61

Closed yuvilio closed 7 years ago

yuvilio commented 7 years ago

As a front end share link convenience library, the Quickshare library started nicely but quieted down as project for a while now . Should we consider an alternative one or just removing the it?

kylehotchkiss commented 7 years ago

You know what I always do... just add some JS that makes FB/Twitter share windows open in the same dimension and add some GA tracking for clicks on those buttons.

Lightweight, future proof.

jeffgreco commented 7 years ago

Kyle, do you know what your code lacks that Quickshare provides? I really appreciate the data attributes in QS but their end result is essentially the same as you are describing.

kylehotchkiss commented 7 years ago

I don't have custom share text via data attributes or anything fancy like that yet: this is the extent of what I normally do:

var social = function() {
    jQuery("a[href*='twitter.com/intent']").unbind();

    var socialpopup = function( url, title, width, height ) {
        var top = ( screen.height / 2 ) - ( height / 2 );
        var left = ( screen.width / 2 ) - ( width / 2 );

        window.open( url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + width + ', height=' + height + ', top=' + top + ', left=' + left );
    };

    jQuery("a[href*='facebook.com/sharer']").click(function( event ) {
        event.preventDefault();
        var url = jQuery(this).attr("href");
        socialpopup( url, "Share on Facebook", 550, 520 );
    });

    jQuery("a[href*='twitter.com/intent']").click(function( event ) {
        event.preventDefault();
        var url = jQuery(this).attr("href");
        socialpopup( url, "Share on Twitter", 550, 520 );
    });
};

But we could certainly add this to this and use more data attrs and make it more friendly.

ccorda commented 7 years ago

What's the problem we're trying to solve with quickshare? It's small enough we could easily fork it if need be. The only thing that comes to mind to me is #15

jeffgreco commented 7 years ago

Yeah, I feel like the half of the problem that QuickShare solves that Kyle's code doesn't is the Encoding-strings-into-the-needed-formats part. I haven't been having QS issues myself, even if it isn't particularly developed.

ccorda commented 7 years ago

Closing this out as I never heard an argument for what we're trying to solve for. By all means reopen if people find shortcomings with quick share.