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

Rewards rebase #53

Merged
merged 79 commits into from May 10, 2018
Merged
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
72cb75f
Initial commit. Code works on staging with some temp workarounds
Apr 23, 2018
443f6c4
Removing temporary code.
Apr 23, 2018
64a945a
hot dog
trickpattyFH20 Mar 27, 2018
888c8b1
init circle
trickpattyFH20 Mar 29, 2018
7884800
react hot dog
trickpattyFH20 Mar 29, 2018
eac594c
rewards hot dog ui
trickpattyFH20 Mar 30, 2018
7358f88
close circle
trickpattyFH20 Mar 30, 2018
4c6004b
routing and offer card
trickpattyFH20 Apr 2, 2018
8b45dad
reward card layout
trickpattyFH20 Apr 2, 2018
06474ca
more offer card styles
trickpattyFH20 Apr 2, 2018
8feb2f6
card footer + copy feedback + styling
trickpattyFH20 Apr 3, 2018
c325bb9
more styles
trickpattyFH20 Apr 3, 2018
a6381f5
remove purple test style
trickpattyFH20 Apr 4, 2018
eeea57a
test rewards postmessage
trickpattyFH20 Apr 4, 2018
830aee8
one reward at a time for hot dog and offer card
trickpattyFH20 Apr 5, 2018
df4ea54
header + footer + styles
trickpattyFH20 Apr 9, 2018
d11ba1c
react shadow
trickpattyFH20 Apr 13, 2018
169fff4
define MainView first
trickpattyFH20 Apr 13, 2018
44ddfc6
lint
trickpattyFH20 Apr 16, 2018
4084715
add onmessage
trickpattyFH20 Apr 16, 2018
0521a73
fix selector and close button
trickpattyFH20 Apr 16, 2018
603e73f
iframe fallback
trickpattyFH20 Apr 17, 2018
2029ba2
fix ff beta logo
trickpattyFH20 Apr 17, 2018
2efba4c
data csp compatible images + class for index + text styles
trickpattyFH20 Apr 18, 2018
88b0621
disable rewards notification
trickpattyFH20 Apr 18, 2018
52ae822
fix shadow FOUC
trickpattyFH20 Apr 18, 2018
b55f20d
click outside settings
trickpattyFH20 Apr 18, 2018
ef81951
settings styles
trickpattyFH20 Apr 20, 2018
8049a56
settings actions
trickpattyFH20 Apr 23, 2018
27b8d4f
show ghostery pizza offer
trickpattyFH20 Apr 24, 2018
0613ab9
fix event listener reward reference
trickpattyFH20 Apr 26, 2018
52de54f
setConfiguration - for DEBUG only
Apr 27, 2018
632744e
Changing the way browser-core is loaded.
Apr 27, 2018
dff2831
handle signal
trickpattyFH20 Apr 30, 2018
99537a1
mark offer read + delete offer
trickpattyFH20 Apr 30, 2018
c23fe6f
new signals
trickpattyFH20 Apr 30, 2018
85002e5
refactor to sendSignal
trickpattyFH20 May 1, 2018
7ef9f23
Create ToggleSlider component. Use it in Setup flow.
IAmThePan Apr 11, 2018
c9c69ac
GH-409 Update Rewards view: rewards list, toggle on/off, reducers, fa…
IAmThePan Apr 16, 2018
2083be0
GH-409 Update Rewards view: reward details.
IAmThePan Apr 18, 2018
e2351b6
hot dog
trickpattyFH20 Mar 27, 2018
7301085
Integrate panel rewards with background I
IAmThePan Apr 26, 2018
dfb6317
Integrate panel rewards with background II. Fix linting errors
IAmThePan Apr 30, 2018
74b6611
Integrate panel rewards with Background III. Messages for read, remov…
IAmThePan Apr 30, 2018
574f679
Fix signal bug for content-script rewards
IAmThePan May 1, 2018
45094be
panel reward signals
trickpattyFH20 May 1, 2018
b771879
reward prompt flow
trickpattyFH20 May 1, 2018
456e54d
Finalize design for Rewards Panel
IAmThePan May 2, 2018
7d923da
clean rewards
trickpattyFH20 May 2, 2018
b4f87fe
rewards conf handling
trickpattyFH20 May 3, 2018
8272b01
update browser-core package and lock
trickpattyFH20 May 3, 2018
4bf063e
Add translations to Rewards Panel
IAmThePan May 3, 2018
f0aa355
Fix for Ghostery side enabling of offers
May 3, 2018
332f79f
styles. expiration. terms tt
trickpattyFH20 May 3, 2018
7dbd42f
enable offers by default
trickpattyFH20 May 3, 2018
455bc0e
start button styles
trickpattyFH20 May 3, 2018
3ed2459
Begin tests for the rewards panel
IAmThePan May 3, 2018
a3f202c
More and updated tests for Rewards Panel
IAmThePan May 3, 2018
a6f1441
Fix linting errors
IAmThePan May 3, 2018
a904612
signals
trickpattyFH20 May 4, 2018
9640606
Add more signals, fix linting errors, fix bug
IAmThePan May 4, 2018
417f461
Removing offers from ABTest
May 7, 2018
2815dca
style adjustments
trickpattyFH20 May 7, 2018
d87c7c9
GH-1051 fix null reward check
trickpattyFH20 May 8, 2018
48b38fd
GH-1055 fix - define onload evt first
trickpattyFH20 May 8, 2018
e294c78
button singleton + seen reward on offer card shown
trickpattyFH20 May 9, 2018
afb2dc4
typo
trickpattyFH20 May 9, 2018
7fb6652
Removing enable_offers_abtest.
May 9, 2018
83e7b78
Extra blanks
May 9, 2018
3976965
Removing checkbox for EDGE and CLIQZ unconditionally.
May 9, 2018
07983d0
Restore default manifest state.
May 9, 2018
bb2ee65
Update Rewards copy and add styling to non-happy-path Rewards panel
IAmThePan May 10, 2018
771c910
Update test snapshots
IAmThePan May 10, 2018
86111a3
Update package-lock file
IAmThePan May 10, 2018
86cc883
Minor copy change
IAmThePan May 10, 2018
63afa92
GH-1066 Fix text overflow on rewards panel
IAmThePan May 10, 2018
c25119b
Update snapshots for Reward Detail unit tests
IAmThePan May 10, 2018
afc04fc
documentation and svg cleanup
christophertino May 10, 2018
88229ed
Merge branch 'develop' into rewards-rebase
christophertino May 10, 2018
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

disable rewards notification
  • Loading branch information
trickpattyFH20 authored and IAmThePan committed May 10, 2018
commit 88b0621b4cc2bf103dafc406642491f93b6f6314
@@ -1620,5 +1620,11 @@
},
"rewards_disable": {
"message": "Turn off Ghostery rewards"
},
"rewards_disable_notification": {
"message": "Ghostery Rewards is now off. You can always turn it on in Ghostery settings or in the Ghostery Dashboard."
},
"rewards_disable_confirm": {
"message": "OK, got it."
}
}
@@ -0,0 +1,38 @@
import React, { Component } from 'react';

class Notification extends Component {
constructor(props) {
super(props);
this.closeIcon = `url(${chrome.extension.getURL('app/images/rewards/white-x.svg')})`;
this.state = {
closed: false
};

this.close = this.close.bind(this);
}

close() {
this.setState({
closed: true
});
if (typeof this.props.closeCallback === 'function') {
this.props.closeCallback();
}
}

render() {
return(
<div>
{!this.state.closed && <div className="rewards-notification-container">
<div className="rewards-notification">
<div className="close" onClick={this.close} style={{backgroundImage: this.closeIcon}} />
<div className="notification-text">{t('rewards_disable_notification')}</div>
<a className="notification-text" onClick={this.close}>{t('rewards_disable_confirm')}</a>
</div>
</div>}
</div>
);
}
}

export default Notification;
@@ -3,6 +3,7 @@ import ReactDOM from 'react-dom';
import { Link } from 'react-router-dom';
import msgModule from '../utils/msg';
import { log } from '../../../src/utils/common';
import Notification from './Notification';

const msg = msgModule('rewards');
const { sendMessage } = msg;
@@ -14,7 +15,8 @@ class OfferCard extends Component {
console.log('constructor props:', props);
this.state = {
closed: false,
copyText: t('rewards_copy_code')
copyText: t('rewards_copy_code'),
showNotification: false
};

this.iframeEl = parent.document.getElementById('ghostery-iframe-container');
@@ -30,6 +32,7 @@ class OfferCard extends Component {

this.close = this.close.bind(this);
this.copyCode = this.copyCode.bind(this);
this.disableRewards = this.disableRewards.bind(this);
}

copyCode() {
@@ -50,6 +53,12 @@ class OfferCard extends Component {
}, 3000);
}

disableRewards() {
this.setState({
showNotification: true
});
}

close() {
if (this.iframeEl) {
this.iframeEl.classList = '';
@@ -61,10 +70,14 @@ class OfferCard extends Component {

render() {
console.log('render props:', this.props);
console.log('render state:', this.state);
return (
<div className="ghostery-rewards-component">
{ this.state.closed !== true &&
<div className="ghostery-reward-card">
{ this.state.showNotification &&
<Notification closeCallback={this.close} />
}
<div className="reward-card-header">
<div className="rewards-logo-beta" style={{backgroundImage: this.betaLogo}} />
<div className="reward-card-close" onClick={this.close} style={{backgroundImage: this.closeIcon}} />
@@ -111,7 +124,7 @@ class OfferCard extends Component {
<div className="reward-footer">
<div className="reward-feedback">
<div className="reward-smile" />
<a>{t('rewards_disable')}</a>
<a onClick={this.disableRewards}>{t('rewards_disable')}</a>
<div className="reward-arrow" />
</div>
<div className="reward-ghosty" style={{backgroundImage: this.ghostyGrey}} />
Empty file.
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="10px" height="10px" viewBox="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 48.2 (47327) - http://www.bohemiancoding.com/sketch -->
<title>Fill 2</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="strong-rewards-notification-Main-Copy-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-2782.000000, -2929.000000)">
<g id="Group-25" transform="translate(2176.000000, 2563.000000)" fill="#FFFFFF">
<path d="M612.718565,371 L615.642492,368.075748 C616.11744,367.601125 616.11744,366.831159 615.642492,366.356211 C615.167545,365.881263 614.397578,365.881263 613.924252,366.356211 L611,369.281435 L608.075748,366.356211 C607.601125,365.881263 606.831159,365.881263 606.356211,366.356211 C605.881263,366.831159 605.881263,367.601125 606.356211,368.075748 L609.280138,371 L606.356211,373.924252 C605.881263,374.398875 605.881263,375.168841 606.356211,375.643789 C606.831159,376.118737 607.601125,376.118737 608.074776,375.643789 L611,372.718565 L613.924252,375.642492 C614.398875,376.11744 615.168841,376.11744 615.643789,375.642492 C616.118737,375.167545 616.118737,374.397578 615.643789,373.922955 L612.718565,371 Z" id="Fill-2"></path>
</g>
</g>
</svg>
@@ -24,6 +24,10 @@
}

.ghostery-rewards-component {
* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.hide {
visibility: hidden;
@@ -92,9 +96,7 @@
}

.ghostery-reward-card {
div {
color: $tundora;
}
color: $tundora;
background-color: #f2f2f2;
width: 265px;
height: 520px;
@@ -152,10 +154,6 @@
border: 1px solid $dark-purple;
border-radius: 4px;

div, span, p {
color: $tundora;
}

.reward-content-header {
display: flex;
flex-direction: row;
@@ -225,7 +223,6 @@
flex: 1;
user-select: text;
margin-left: 8px;
color: #494949;
align-self: center;
font-size: 13px;
font-weight: 500;
@@ -315,6 +312,45 @@
}
}

.rewards-notification-container {
width: 100%;
height: 100%;
position: absolute;
text-align: center;
color: $white;

.rewards-notification {
margin-top: 17px;
margin-left: auto;
margin-right: auto;
height: 161px;
width: 210px;
background-color: $dark-purple;
display: flex;
flex-direction: column;
font-size: 13px;
line-height: 2;

.notification-text {
margin: 0px 22px 0px 22px;
}

a {
text-decoration: underline;
cursor: pointer;
}

.close {
cursor: pointer;
background-repeat: no-repeat;
height: 10px;
width: 10px;
align-self: flex-end;
margin: 10px 10px 0px 0px;
}
}
}

}

#ghostery-rewards-app.iframe-child {
ProTip! Use n and p to navigate between commits in a pull request.