boston-library / commonwealth-vlr-engine

Commonwealth-VLR-Engine is a Rails engine for creating Blacklight apps that provide access to content from Solr/Fedora, packaging a number of feature-rich enhancements and modifications.
Apache License 2.0
8 stars 2 forks source link

replace addthis for social sharing #29

Open ebenenglish opened 3 years ago

ebenenglish commented 3 years ago

AddThis collects personal info from users, we should avoid using this and remove it ASAP.

https://www.oracle.com/legal/privacy/addthis-privacy-policy.html

ebenenglish commented 1 year ago

Welp, AddThis is dead:

As part of a periodic product portfolio review, Oracle has made the business decision to terminate all AddThis services effective as of May 31, 2023.

ebenenglish commented 1 year ago

AddThis was removed via 2f13d077087ede88e34d9493e4574fd90191751a.

We still need to implement a replacement. There is a placeholder partial in app/views/catalog/_sharing.html.erb.

Preferably something open-source, that does not do any user tracking.

Possibly https://www.addtoany.com/? Need to investigate this further.

Alternately, we could build our own set of sharing links. Would need to include:

ebenenglish commented 11 months ago

Here are some relevant files for the previous implementation of AddThis:

https://github.com/boston-library/commonwealth-vlr-engine/blob/677fed6f37a3315ff54f2c20aab1a6a7aba46703/lib/commonwealth-vlr-engine/controller_override.rb#L210

https://github.com/boston-library/commonwealth-vlr-engine/blob/677fed6f37a3315ff54f2c20aab1a6a7aba46703/lib/commonwealth-vlr-engine/controller_override.rb#L259-L261

https://github.com/boston-library/commonwealth-vlr-engine/blob/677fed6f37a3315ff54f2c20aab1a6a7aba46703/app/views/catalog/_add_this.html.erb

Screenshot: https://bostonpubliclibrary.sharepoint.com/:i:/s/DigitalServices/EUczBs_Wu7NMpMGa9T1sTigBl68wShdw76h7wyJsomdatQ?e=P6Qxhz

ebenenglish commented 9 months ago

After review, the best solution seems to be to build our own sharing functionality.

The UX should be similar to the "Blog.google" example in the "Sharing UI" doc created by @jwillbpl.

When I am on the item detail page for an item (catalog#show view) There should be a "Share" option in the Tools widget on the lower right of the page And the Share option should be the first link in the list And the link should include the standard share icon in the display And when I click the link I should see a popup window with a set of sharing links And the links should be (in order):

And each link should display with an icon and service name And when I click a link for a social media site It should open in a new tab

@jwillbpl, I would suggest trying to use Bootstrap's dropdown button functionality for implementing this, since Bootstrap JS features are already integrated in the app.

There is a dropdown button currently in use on the header navigation links:

You can use Font Awesome for the service icons (also already integrated into the codebase), using the icon helper. A couple examples:

ebenenglish commented 9 months ago

We will also want to track these sharing link clicks, @ebenenglish will add tracking to Google Tag Manager after the functionality has been implemented.