Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Social sharing feature #398

Merged
merged 91 commits into from
Jul 18, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
e023c32
Output share icons to link ui dialog window
ZachTRice May 25, 2017
05ebcfc
Removed unnecessary file, updated syntax
ZachTRice May 25, 2017
cccedac
Began converting react component based code to something usable
ZachTRice May 25, 2017
5bc4417
Styled buttons, added URL parameters.
ZachTRice May 25, 2017
7e75285
Updated mail parameters, removed link from Twitter
ZachTRice May 25, 2017
38381fc
Fixed issue with mailto parameters
ZachTRice May 25, 2017
b44e94a
Link shorten on share, formatted text, schema.org tags added
ZachTRice May 26, 2017
032e603
Updated messages, cleaned up parameters, added new preview image
ZachTRice May 26, 2017
5de79c0
Formatted URL parameters to be easier to read
ZachTRice Jun 1, 2017
4902ad0
Code formatting
ZachTRice Jun 1, 2017
16b8752
Changed meta tags, updated links for UAT testing, new preview image
ZachTRice Jun 2, 2017
0abe1d7
Updated branch for testing
ZachTRice Jun 2, 2017
37b8b31
Added facebook AppID
ZachTRice Jun 2, 2017
d782444
Added new preview image, added fb AppID, updated redirect_uri
ZachTRice Jun 2, 2017
c8bafc3
Testing images
ZachTRice Jun 2, 2017
fd2a3bb
Test jpg image quality
ZachTRice Jun 2, 2017
5aca1d8
Regenerated preview image with Photoshop
ZachTRice Jun 5, 2017
2a2a638
Added check: If can shorten link then set short link for tw & email
ZachTRice Jun 5, 2017
d30b1d5
Updated images, code cleanup
ZachTRice Jun 5, 2017
5d9db49
Added png preview image
ZachTRice Jun 5, 2017
814041b
Changed meta tag to use preview.png
ZachTRice Jun 5, 2017
b54081d
Added todo to replace google plus with reddit
ZachTRice Jun 5, 2017
a819cb4
Added reddit button, removed warnings if share btn can't shorten link
ZachTRice Jun 7, 2017
0811011
Styled reddit button, removed google plus button
ZachTRice Jun 7, 2017
4f5f7ae
Removed unneeded preview images
ZachTRice Jun 8, 2017
f0b707f
Updated files inconjunction with wv components changes
ZachTRice Jun 16, 2017
0950b02
Splitting out old ui functionality; added in react widget file
ZachTRice Jun 19, 2017
c5a5c56
Keep share button output the same, only render react modal on click
ZachTRice Jun 19, 2017
09a6c99
New share-modal location. Cleaned up widgetFactory & unused functions
ZachTRice Jun 19, 2017
dde60e5
Moved updateLink function to components
ZachTRice Jun 19, 2017
83faa27
Output share icons to link ui dialog window
ZachTRice May 25, 2017
cf3c0a5
Removed unnecessary file, updated syntax
ZachTRice May 25, 2017
0b2afe1
Began converting react component based code to something usable
ZachTRice May 25, 2017
60ece97
Styled buttons, added URL parameters.
ZachTRice May 25, 2017
8dc43ee
Updated mail parameters, removed link from Twitter
ZachTRice May 25, 2017
c6d1d16
Fixed issue with mailto parameters
ZachTRice May 25, 2017
1b4fef3
Link shorten on share, formatted text, schema.org tags added
ZachTRice May 26, 2017
202150a
Updated messages, cleaned up parameters, added new preview image
ZachTRice May 26, 2017
50e9d36
Formatted URL parameters to be easier to read
ZachTRice Jun 1, 2017
871247e
Code formatting
ZachTRice Jun 1, 2017
6e0c38f
Changed meta tags, updated links for UAT testing, new preview image
ZachTRice Jun 2, 2017
f46fb64
Updated branch for testing
ZachTRice Jun 2, 2017
5be18e0
Added facebook AppID
ZachTRice Jun 2, 2017
df3b912
Added new preview image, added fb AppID, updated redirect_uri
ZachTRice Jun 2, 2017
c29caf5
Testing images
ZachTRice Jun 2, 2017
b4c00d7
Test jpg image quality
ZachTRice Jun 2, 2017
e4891fd
Regenerated preview image with Photoshop
ZachTRice Jun 5, 2017
7dd910d
Added check: If can shorten link then set short link for tw & email
ZachTRice Jun 5, 2017
d019067
Updated images, code cleanup
ZachTRice Jun 5, 2017
6044870
Added png preview image
ZachTRice Jun 5, 2017
bce53f2
Changed meta tag to use preview.png
ZachTRice Jun 5, 2017
c5c36a6
Added todo to replace google plus with reddit
ZachTRice Jun 5, 2017
fdb1f5a
Added reddit button, removed warnings if share btn can't shorten link
ZachTRice Jun 7, 2017
409d4da
Styled reddit button, removed google plus button
ZachTRice Jun 7, 2017
efdce91
Removed unneeded preview images
ZachTRice Jun 8, 2017
9f13f2d
Updated files inconjunction with wv components changes
ZachTRice Jun 16, 2017
a2a7272
Splitting out old ui functionality; added in react widget file
ZachTRice Jun 19, 2017
8150428
Keep share button output the same, only render react modal on click
ZachTRice Jun 19, 2017
45d20ad
New share-modal location. Cleaned up widgetFactory & unused functions
ZachTRice Jun 19, 2017
e55b2d5
Moved updateLink function to components
ZachTRice Jun 19, 2017
1def505
Removed unneeded wv.link.ui and refernces.
ZachTRice Jun 19, 2017
fa12626
Removed wv.link.ui and references
ZachTRice Jun 19, 2017
6a1c0f3
Reverted naming back to ui to not conflict with main.js's ui.link
ZachTRice Jun 19, 2017
d02733e
Added Share to React.createFactory
ZachTRice Jun 20, 2017
18840e3
Code cleanup. Combined chained addClass's
ZachTRice Jun 21, 2017
2b33adb
Moved output of shorten / share btns to wv-components share.
ZachTRice Jun 22, 2017
a39dd46
Fixed email link double encoding
ZachTRice Jun 23, 2017
82a1110
Removed models from WidgetFactory. Changed 'configs' to 'urlShortening'
ZachTRice Jun 23, 2017
ab2acaf
Changed react Share import to Link to match update to wvc naming
ZachTRice Jun 26, 2017
37166a1
Moved url replacement on click to worldview-components
ZachTRice Jun 26, 2017
e6b3b2c
Removed unneeded variables
ZachTRice Jun 26, 2017
cecccd8
Moved shorten link on change function into worldview-components
ZachTRice Jun 27, 2017
0db71ac
Restore icon-link on click until doubleclick issues are sorted with wvc
ZachTRice Jun 27, 2017
8a8eba4
Brought model functionality back into WV; passing socialLinks to WVC
ZachTRice Jun 27, 2017
0fd20bb
Added functions to simplify passing parameters to social links
ZachTRice Jun 27, 2017
7d253cb
Removed jQuery's param functionality do to uri encoding issues
ZachTRice Jun 27, 2017
cc52c27
Code cleanup. Removed console.log, unneeded TODO's, etc.
ZachTRice Jun 27, 2017
5e5a849
Added urlShortener config param to pass into WVC shortener render.
ZachTRice Jun 27, 2017
2ae2ee2
Added console warn if shorten promise fails when sharing link
ZachTRice Jun 28, 2017
3ec22e5
Created setLink cb method; runs on dialog init to set react states
ZachTRice Jun 28, 2017
cecb0cf
Updated variable definitions
ZachTRice Jun 28, 2017
ae139fc
Added click function in WV from react onClick to update link states
ZachTRice Jun 28, 2017
962967a
Reset link in input upon setting link states.
ZachTRice Jun 29, 2017
0298a0e
Merge branch 'master' into share-feature
ZachTRice Jun 29, 2017
5ead514
Added flexbox fallback to support ios and older browsers
ZachTRice Jun 30, 2017
554346e
Updated start tour's share icon
ZachTRice Jul 7, 2017
60813b6
Merge branch 'master' of https://github.com/nasa-gibs/worldview into …
ZachTRice Jul 13, 2017
31e066b
Moved URL Shortener component back into WV
ZachTRice Jul 14, 2017
1e14cb9
Moved on dialogcreate function to be called first
ZachTRice Jul 14, 2017
aa2ba58
Moved on dialogcreate to be called first when opening dialog
ZachTRice Jul 14, 2017
86d16ce
Bumped worldview-components version to 1.3.0
ZachTRice Jul 18, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Styled reddit button, removed google plus button
  • Loading branch information
ZachTRice committed Jun 19, 2017
commit 409d4dadd7d7ebd270d308577f4ef9122dc415ed
18 changes: 17 additions & 1 deletion web/css/wv.link.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
display: inline-block;
height: 48px;
line-height: 48px;
margin: auto 10px;
width: 48px;
font-size: 24px;
text-align: center;
Expand All @@ -34,6 +33,23 @@
background-color: #00aced;
}

#social-share .fa-reddit {
position: relative;
color: #FF5700;
background-color: #fff;
font-size: 48px;
height: 46px;
width: 46px;
margin-left: 1px;
}

#social-share .fa-reddit:before {
border-radius: 50%;
position: absolute;
left: -1px;
top: 0;
}

#social-share .fa-google-plus {
background-color: #d34836;
}
Expand Down
12 changes: 6 additions & 6 deletions web/js/link/wv.link.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ wv.link.ui = wv.link.ui || function(models, config) {
"target='_blank' " +
"title='Share via Twitter!'></a>";

// TODO: Replace Google+ with reddit
// Reddit
// https://www.reddit.com/r/nasa/submit?url=[URL]&title=[TITLE]
item += "<a id='rd-share' class='icon-link fa fa-reddit fa-2x' href='https://www.reddit.com/r/nasa/submit?" +
"url=" + defaultLink +
"&title=" + shareMessage + "' " +
"target='_blank' " +
"title='Share on Reddit!'></a>";
"title='Share via Reddit!'></a>";

// Google Plus: https://developers.google.com/+/web/share/#sharelink-endpoint
// item += "<a id='gp-share' class='icon-link fa fa-google-plus fa-2x' href='https://plus.google.com/share?" +
Expand Down Expand Up @@ -183,10 +183,10 @@ wv.link.ui = wv.link.ui || function(models, config) {
);

// Set Google Plus
var gpLink = document.getElementById("gp-share");
gpLink.setAttribute("href", "https://plus.google.com/share?" +
"url=" + fullEncodedLink
);
// var gpLink = document.getElementById("gp-share");
// gpLink.setAttribute("href", "https://plus.google.com/share?" +
// "url=" + fullEncodedLink
// );

// Set Email
var emailLink = document.getElementById("email-share");
Expand Down