Skip to content
This repository has been archived by the owner. It is now read-only.

refactor(client): Configurable marketing-snippet and marketing-mixin. #4519

Merged
merged 1 commit into from Dec 21, 2016

Conversation

@shane-tomlinson
Copy link
Member

@shane-tomlinson shane-tomlinson commented Dec 16, 2016

This is an extraction from #4370 to make both simpler to review. For
that PR, we need to be able to configure which app store logos are
displayed to the user. This allows us to do so.

The marketing-mixin module, instead of returning a mixin, returns
a function that must be called with configuration options, the function
returns the actual mixin.

The marketing_snippet module allows two additional configuration
options:

  • marketingId is the id used to log impressions and clicks
  • which forces specific logo(s) to be displayed. If not specified,
    uses default behavior.

The Adjust links are extracted into Constants.js and shared between
marketing_snippet.js and settings/clients.js.

base.js->getSearchParam has been added to fetch
a single search parameter.

Add isFirefoxAndroid, isFirefoxIos and isFirefoxDesktop to
user-agent.

@vladikoff - r?

@shane-tomlinson shane-tomlinson requested a review from vladikoff Dec 16, 2016
@shane-tomlinson shane-tomlinson force-pushed the refactor-configurable-marketing-snippet branch 2 times, most recently from 62259d7 to c947233 Dec 19, 2016
},

/**
* If if the browser is Firefox desktop

This comment has been minimized.

@vladikoff

vladikoff Dec 20, 2016
Contributor

nit if if


createView();
function testMarketingCampaign (marketingId) {
function testLinkEl(view, expectedType) {

This comment has been minimized.

@vladikoff

vladikoff Dec 20, 2016
Contributor

nit: testLinkEl feels like a bad name. Can this be: assertLinkHasExpectedType or something?

@vladikoff
Copy link
Contributor

@vladikoff vladikoff commented Dec 20, 2016

forceUA works
image

@shane-tomlinson left 2 nit comments, please merge once addressed 👍

This is an extraction from #4370 to make both simpler to review. For
that PR, we need to be able to configure which app store logos are
displayed to the user. This allows us to do so.

The marketing-mixin module, instead of returning a mixin, returns
a function that must be called with configuration options, the function
returns the actual mixin.

The marketing_snippet module allows two additional configuration
options:
* `marketingId` is the id used to log impressions and clicks
* `which` forces specific logo(s) to be displayed. If not specified,
uses default behavior.

The Adjust links are extracted into Constants.js and shared between
marketing_snippet.js and settings/clients.js.

base.js->getSearchParam has been added to fetch
a single search parameter.

Add `isFirefoxAndroid`, `isFirefoxIos` and `isFirefoxDesktop` to
user-agent.
@shane-tomlinson shane-tomlinson force-pushed the refactor-configurable-marketing-snippet branch from c947233 to 6e7e4bb Dec 21, 2016
@shane-tomlinson shane-tomlinson merged commit 8abf49d into master Dec 21, 2016
4 checks passed
4 checks passed
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.0002%) to 98.604%
Details
@shane-tomlinson shane-tomlinson deleted the refactor-configurable-marketing-snippet branch Dec 21, 2016
@rfk rfk added this to the FxA-0: quality milestone Jan 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants