Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Add sharing current page menu items (Email, Twitter, Facebook...) #8517

Merged
merged 3 commits into from
Apr 27, 2017

Conversation

bbondy
Copy link
Member

@bbondy bbondy commented Apr 27, 2017

Fix #3121

Auditors: @bsclifton

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

Test Plan:

tabs.js is an api file so shouldn't know about actions
@bbondy bbondy changed the title Add a send URL by email menu item Add sharing current page menu items (Email, Twitter, Facebook...) Apr 27, 2017
@bbondy bbondy requested a review from bsclifton April 27, 2017 05:31
@bsclifton bsclifton added parity Features which should be supported in Brave since they're supported in other major browsers. release-notes/include labels Apr 27, 2017
@bsclifton bsclifton added this to the 0.15.1 milestone Apr 27, 2017
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback left- follow up commits always appreciated. LGTM! 😄

const {makeImmutable} = require('../../common/state/immutableUtil')
const {simpleShareActiveTab} = require('../share')

const shareReducer = (state, action) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Food for thought on this one- what other types of sharing do we think we'll have? Could this possibly handle things like Submit Feedback in the Help Menu, etc?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submit feedback would make sense to be moved into here. In the future I was thinking new tab stats sharing from the new tab page would go into here as well.

googlePlus: 'https://plus.google.com/share?url={url}',
linkedIn: 'https://www.linkedin.com/shareArticle?url={url}&title={title}',
buffer: 'https://buffer.com/add?text={title}&url={url}',
digg: 'http://digg.com/submit?url={url}&title={title}',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does digg not offer an https URL?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's an oversight but we aren't using it because Brad asked not to, I'll change it in case we do use it in the future though.

@@ -80,6 +80,14 @@ newSessionTab=New Session Tab
newWindow=New Window
reopenLastClosedTab=Reopen Last Closed Tab
print=Print…
emailPageLink=Email Page Link…
tweetPageLink=Tweet Page…
facebookPageLink=Share on Facebook…
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these would make more sense as the generic template, like "Share on {{siteName}}" and the the l10n library could have the service name input as args. This would prevent translators from possibly changing the usage of the name / brand / platform for the share

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I posted a follow up task marked as good-first-bug for this review comment:
#8604

const url = templateUrl
.replace('{url}', encodedUrl)
.replace('{title}', encodedTitle)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ on the encodeURLComponent calls 😄

@bsclifton bsclifton merged commit 0598ddf into master Apr 27, 2017
@bsclifton bsclifton deleted the email-share branch April 27, 2017 21:58
NejcZdovc added a commit that referenced this pull request Apr 27, 2017
@srirambv
Copy link
Collaborator

image
image

The shortcut for email page link the same as opening page tools

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
parity Features which should be supported in Brave since they're supported in other major browsers. release-notes/include
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants