Skip to content

Commit

Permalink
Removed all social sharing functionality
Browse files Browse the repository at this point in the history
It was outdated (references to google+ which disappeared years ago, no
facebook sharing, no new social networks like instagram...). Integration
with social networks is now out of scope for this project in general.
Users can allways copy-paste URLs of entries to share in their favorite
social network, no need to have dedicated code in FeedBunch for this.
  • Loading branch information
amatriain committed Jan 26, 2021
1 parent 8da8d6b commit a6ccea5
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 161 deletions.
28 changes: 2 additions & 26 deletions app/assets/javascripts/ng-controllers/ng-FeedbunchCtrl.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ angular.module('feedbunch').controller 'FeedbunchCtrl',
['$rootScope', '$scope', '$timeout', '$sce', 'feedsFoldersTimerSvc', 'importStateSvc', 'exportStateSvc', 'timerFlagSvc',
'currentFeedSvc', 'currentFolderSvc', 'subscriptionSvc', 'loadEntriesSvc', 'folderSvc', 'entrySvc',
'findSvc', 'userDataSvc', 'userConfigSvc', 'openEntrySvc', 'unreadCountSvc', 'sidebarVisibleSvc', 'menuCollapseSvc',
'tooltipSvc', 'startPageSvc', 'jobStateSvc', 'socialNetworksSvc', 'cookiesSvc', 'animationsSvc',
'tooltipSvc', 'startPageSvc', 'jobStateSvc', 'cookiesSvc', 'animationsSvc',
'highlightedEntrySvc', 'highlightedSidebarLinkSvc', 'dialogsSvc', 'keyboardShortcutsSvc', 'refreshFeedSvc', 'openFolderSvc',
'loadFeedsSvc', 'showHideReadSvc',
($rootScope, $scope, $timeout, $sce, feedsFoldersTimerSvc, importStateSvc, exportStateSvc, timerFlagSvc,
currentFeedSvc, currentFolderSvc, subscriptionSvc, loadEntriesSvc, folderSvc, entrySvc,
findSvc, userDataSvc, userConfigSvc, openEntrySvc, unreadCountSvc, sidebarVisibleSvc, menuCollapseSvc,
tooltipSvc, startPageSvc, jobStateSvc, socialNetworksSvc, cookiesSvc, animationsSvc,
tooltipSvc, startPageSvc, jobStateSvc, cookiesSvc, animationsSvc,
highlightedEntrySvc, highlightedSidebarLinkSvc, dialogsSvc, keyboardShortcutsSvc, refreshFeedSvc, openFolderSvc,
loadFeedsSvc, showHideReadSvc)->

Expand Down Expand Up @@ -295,22 +295,6 @@ loadFeedsSvc, showHideReadSvc)->
menuCollapseSvc.close()
return

#--------------------------------------------
# Share an entry on Google+
#--------------------------------------------
$scope.share_gplus_entry = (entry)->
socialNetworksSvc.share_gplus_entry entry
menuCollapseSvc.close()
return

#--------------------------------------------
# Share an entry on Linkedin
#--------------------------------------------
$scope.share_linkedin_entry = (entry)->
socialNetworksSvc.share_linkedin_entry entry
menuCollapseSvc.close()
return

#--------------------------------------------
# Return the title of the feed to which an entry belongs
#--------------------------------------------
Expand Down Expand Up @@ -448,14 +432,6 @@ loadFeedsSvc, showHideReadSvc)->
animationsSvc.toggle_user_menu()
return

#--------------------------------------------
# Toggle (open/close) an entry social sharing menu with an animation.
# Receives as argument the entry.
#--------------------------------------------
$scope.toggle_entry_social_menu = (entry)->
animationsSvc.toggle_entry_social_menu entry
return

#--------------------------------------------
# Return a feed title, given its id.
#--------------------------------------------
Expand Down
14 changes: 0 additions & 14 deletions app/assets/javascripts/ng-services/ng-AnimationsSvc.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -296,20 +296,6 @@ angular.module('feedbunch').service 'animationsSvc',
else
open_menu menu_wrapper, menu_link, event_namespace

#---------------------------------------------
# Animate toggling (open/close) an entry social sharing menu.
# Receives the entry as argument.
#---------------------------------------------
toggle_entry_social_menu: (entry)->
menu_wrapper = $("#entry-#{entry.id}-social-menu")
menu_link = $("#entry-#{entry.id}-social")
event_namespace = 'click.outside_social_menu'

if menu_wrapper.hasClass 'open'
close_menu menu_wrapper, menu_link, event_namespace
else
open_menu menu_wrapper, menu_link, event_namespace

#---------------------------------------------
# Animate toggling (open/close) the switch locale menu.
#---------------------------------------------
Expand Down
40 changes: 0 additions & 40 deletions app/assets/javascripts/ng-services/ng-SocialNetworksSvc.js.coffee

This file was deleted.

39 changes: 0 additions & 39 deletions app/views/read/_entries_toolbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,4 @@
</a>
</div>

<div id="entry-{{entry.id}}-social-menu"
ng-class="{entry_open_social: is_entry_open(entry)}"
class="btn-group dropdown pull-right">

<a id="entry-{{entry.id}}-social"
class="btn btn-default btn-sm dropdown-toggle"
ng-click="toggle_entry_social_menu(entry)"
data-share-entry-dropdown
data-placement="top"
title="<%= t 'read.entries.share_tooltip' %>">
<i class="fa fa-fw fa-share-alt"></i> <%= t 'read.entries.share' %> <i class="fa fa-fw fa-caret-down"></i>
</a>

<ul class="dropdown-menu">

<li>
<a href="https://twitter.com/intent/tweet?url={{entry.url}}&via=feedbunch&text={{entry.title}}"
target="_blank" rel="noopener noreferrer">
<i class="fa fa-fw fa-twitter"></i>&nbsp;<%= t 'read.entries.share_twitter' %>
</a>
</li>

<li>
<a ng-click="share_gplus_entry(entry)"
target="_blank" rel="noopener noreferrer">
<i class="fa fa-fw fa-google-plus"></i>&nbsp;<%= t 'read.entries.share_gplus' %>
</a>
</li>

<li>
<a ng-click="share_linkedin_entry(entry)"
target="_blank" rel="noopener noreferrer">
<i class="fa fa-fw fa-linkedin"></i>&nbsp;<%= t 'read.entries.share_linkedin' %>
</a>
</li>

</ul>
</div>

</div>
5 changes: 0 additions & 5 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,6 @@ en:
mark_read_tooltip: "Mark this entry as read"
mark_read: "Unread"
share: "Share"
share_tooltip: "Share this entry"
share_twitter: "Twitter"
share_facebook: "Facebook"
share_gplus: "Google+"
share_linkedin: "Linkedin"
title_tooltip: "Open web page in a new tab"
feed_tooltip: "Read entries from this feed"
alerts:
Expand Down
5 changes: 0 additions & 5 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,6 @@ es:
mark_read_tooltip: "Marcar esta entrada como leída"
mark_read: "Sin leer"
share: "Compartir"
share_tooltip: "Compartir esta entrada"
share_twitter: "Twitter"
share_facebook: "Facebook"
share_gplus: "Google+"
share_linkedin: "Linkedin"
title_tooltip: "Abrir página web en una pestaña nueva"
feed_tooltip: "Leer entradas de este feed"
alerts:
Expand Down
32 changes: 0 additions & 32 deletions spec/acceptance_tests/suite_1/social_sharing_spec.rb

This file was deleted.

0 comments on commit a6ccea5

Please sign in to comment.