This repository has been archived by the owner. It is now read-only.
Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFixes publisher not added to the ledger #11592
Merged
+282
−822
Conversation
codecov-io
commented
Oct 18, 2017
•
Codecov Report
@@ Coverage Diff @@
## master #11592 +/- ##
==========================================
- Coverage 52.54% 52.26% -0.29%
==========================================
Files 268 268
Lines 25296 25311 +15
Branches 4032 4034 +2
==========================================
- Hits 13293 13228 -65
- Misses 12003 12083 +80
|
9c20c0b
to
cc9b183
|
I am done with an initial work. I am waiting for some feedback regarding what is visit, then I will do final clenup |
30e33b5
to
f7b1813
|
PR is ready for the review |
f7b1813
to
4d5c436
| @@ -3,6 +3,8 @@ | |||
| * You can obtain one at http://mozilla.org/MPL/2.0/. */ | |||
|
|
|||
| const Immutable = require('immutable') | |||
| const electron = require('electron') | |||
This comment has been minimized.
This comment has been minimized.
bbondy
Oct 23, 2017
Member
this is fine but I think preferred style is const {BrowserWindow} = require('electron')
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| if (!lastActiveTabId || tabId === lastActiveTabId) { | ||
| state = ledgerApi.pageDataChanged(state, { | ||
| location: pageUrl, | ||
| tabId: tabId |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| @@ -1,5 +1,6 @@ | |||
| chrome.idle.setDetectionInterval(15 * 60) | |||
| chrome.idle.onStateChanged.addListener((idleState) => { | |||
| // uses appConstants.APP_IDLE_STATE_CHANGED action constant | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| afterEach(function () { | ||
| pageDataChangedSpy.restore() | ||
| }) | ||
| it('doesnt calls ledgerApi.pageDataChanged when no idle state is provided', function () { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| assert(pageDataChangedSpy.withArgs(appState).calledOnce) | ||
| }) | ||
| it('calls ledgerApi.addVisit', function () { | ||
| assert(addVisitSpy.calledOnce) | ||
| it('doesnt calls ledgerApi.pageDataChanged when in idleState', function () { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
app/common/lib/ledgerUtil.js
Outdated
| * @return {boolean} true if page should have usage collected, false if not | ||
| */ | ||
| const shouldTrackView = (view, responseList) => { | ||
| if (view == null) { | ||
| const shouldTrackView = (tab) => { |
This comment has been minimized.
This comment has been minimized.
bbondy
Oct 23, 2017
•
Member
nit: please rename this to tabValue because we usually use tab as the webContents in code.
This comment has been minimized.
This comment has been minimized.
app/browser/api/ledger.js
Outdated
| if (location === currentUrl) { | ||
| return state | ||
| } | ||
|
|
||
| state = setLocation(state, timestamp, tabId) | ||
| /* | ||
| Save previous recorder page |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
app/browser/api/ledger.js
Outdated
| const aboutUrl = getSourceAboutUrl(lastUrl) || lastUrl | ||
| if (aboutUrl && aboutUrl.match(/^about/)) { | ||
| state = pageDataState.resetInfo(state) | ||
| // add visit to the ledger when we are not in a private tab |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
app/browser/api/ledger.js
Outdated
|
|
||
| currentUrl = (location && location.match(/^about/)) ? locationDefault : location | ||
| currentTimestamp = timestamp | ||
| // update to the latest view |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
4d5c436
to
eac5a03
NejcZdovc
added a commit
that referenced
this pull request
Oct 23, 2017
Fixes publisher not added to the ledger
NejcZdovc
added a commit
that referenced
this pull request
Oct 23, 2017
Fixes publisher not added to the ledger
NejcZdovc
added a commit
that referenced
this pull request
Oct 23, 2017
Fixes publisher not added to the ledger
This was referenced Oct 24, 2017
Closed
This was referenced Oct 24, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
NejcZdovc commentedOct 18, 2017
•
edited
Submitter Checklist:
git rebase -ito squash commits (if needed).Resolves #11553 - Publishers auto-included even with auto-include switch disabled
Resolves #11575 - Page data refactor
Resolves #11273 - Ledger table doesn't auto populate the publishers
Resolves #11274 - Site not added to publisher list even after spending ~10 mins on the site
Auditors:
Test Plan:
for every test plan you need to clean your profile and enable payments
Plan A
Plan B
Plan C- do plan B- switch to the site tab and stay on it for 15s- open new tab and visit different site for 15s- switch to preference tab and new site should be added and old site should have 2 visitsPlan C is not valid, please check plan E
Plan D
Plan E
Plan F
auto-includesettingsPlan G
Plan H
Reviewer Checklist:
Tests