Closed Bug 1535401 Opened 6 years ago Closed 6 years ago

[Context Menu] User dismiss changes rolls causing spocs based on probability appear and disappear

Categories

(Firefox :: New Tab Page, defect, P1)

defect

Tracking

()

VERIFIED FIXED
Firefox 68
Iteration:
68.2 - Apr 1 - 14
Tracking Status
firefox68 --- verified

People

(Reporter: pdahiya, Assigned: pdahiya)

References

Details

(Keywords: github-merged)

Attachments

(1 file)

With dismiss link menu support in pocket new tab, dismiss action causes our redux state to change by hiding blocked story. This triggers refresh of selectLayoutRender.js which houses logic of displaying spocs based off probability.

https://github.com/mozilla/activity-stream/blob/master/content-src/lib/selectLayoutRender.js#L23

This works now as no spoc roll is based on percentages.
https://github.com/mozilla/activity-stream/pull/4837#pullrequestreview-214090555

If the roll isn't always 100% (server changes in the future), this would have a bug where blocking a non spoc would cause existing spocs to appear and disappear. This will be similar to spoc appear and disappear experience on page refresh.

As suggested here https://github.com/mozilla/activity-stream/pull/4837#pullrequestreview-214090555, including Nick to review this issue.

Scott, please feel free to add/edit issue described here. Thanks!

Flags: needinfo?(nchapman)
Assignee: nobody → pdahiya
Iteration: --- → 68.1 - Mar 18 - 31
Priority: -- → P1
No longer blocks: 1512725
Flags: needinfo?(nchapman)
Keywords: github-merged

Steps to test:

  1. Set discoverystream.config pref as

{"api_key_pref":"extensions.pocket.oAuthConsumerKey","enabled":true,"show_spocs":true,"layout_endpoint":"https://gist.githubusercontent.com/punamdahiya/b4a0d9bb9dabac5e6248dd23ea5e09cf/raw/522fe988639b0ba890cf30bfcf6485f97566d592/feed-spocs.json"}

and discoverystream.endpoints pref as
https://getpocket.cdn.mozilla.net/,https://gist.githubusercontent.com/

  1. Reset pref browser.newtabpage.activity-stream.discoverystream.spoc.impressions and browser.newtabpage.activity-stream.discoverystream.rec.impressions

  2. If needed reset pref browser.newtabpage.blocked and restart browser to make dismissed stories come back

  3. Card Grid component beside Hero component at the bottom of layout should have 3rd story (index 2) as sponsored content showing up with probability of 0.5.

  4. In card grid component from step 4, click of dismiss link menu option in context menu on non-spoc stories should not cause disappear and reappear of 3rd story.

Iteration: 68.1 - Mar 18 - 31 → 68.2 - Apr 1 - 14
Blocks: 1541502
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68

I have verified that this issue is no longer reproducible with the latest Firefox Nightly (68.0a1 Build ID - 20190404215521) installed, on Windows 10 x64, Arch Linux and Mac 10.13.3. Now, after following the steps from comment 3, the sponsored content card from step 3 remains displayed.

Status: RESOLVED → VERIFIED
Component: Activity Streams: Newtab → New Tab Page
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: