Closed Bug 1620409 Opened 4 years ago Closed 4 years ago

Dismiss on collection needs slightly different logic

Categories

(Firefox :: New Tab Page, enhancement, P2)

enhancement

Tracking

()

VERIFIED FIXED
Firefox 80
Tracking Status
firefox80 --- verified

People

(Reporter: thecount, Assigned: thecount)

Details

Attachments

(1 file, 1 obsolete file)

Dismiss right now on a collection dismisses the flight_id

This isn't quite what we want, and in a regular card grid, we do.

So we need new logic specific to a collection that ensures if a single collection item is dismissed, the collection itself stays.

Priority: -- → P2
Assignee: nobody → sdowne

Initial proposal:

  1. Leave how regular spocs handle dismiss, being on flight id.
  2. Change collection dismiss to no longer call a dismiss on each item, to instead call dismiss on the flight id. This should take the whole collection with it. Make sure this change is handled in the metrics as well, making any changes needed.
  3. If a single item in the collection is dismissed, we instead dismiss on just the id, and not the flight id.

To test:

  1. set browser.newtabpage.activity-stream.asrouter.devtoolsEnabled to true
  2. set browser.newtabpage.activity-stream.discoverystream.endpoints to http,https
  3. Set browser.newtabpage.activity-stream.discoverystream.config to "{"api_key_pref":"extensions.pocket.oAuthConsumerKey","collapsible":true,"enabled":true,"show_spocs":true,"hardcoded_layout":false,"personalized":true,"layout_endpoint":"https://fdfde809-c40b-4dda-96e1-4df41fab3389.mock.pstmn.io/collection-dismiss-layout"}"

expected, you should see a collection, try dismissing 1 item, should dismiss only the 1 item as expected, add a new item, and shift items over appropriately. If you dismiss another item, it should all disappear, this is because the collection only has 4 available items.

To reset and try again:

  1. Delete whatever is in browser.newtabpage.blocked
  2. restart
  3. go to about:newtab#devtools-ds
  4. click refresh cache
Attachment #9164101 - Attachment is obsolete: true
Pushed by sdowne@getpocket.com:
https://hg.mozilla.org/integration/autoland/rev/abfa3c69454f
New logic for handling collection dismiss. r=perftest-reviewers,gvn,sparky
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 80

I have verified this enhancement using the steps that Scott provided in comment 3 and I can confirm the following:
- The collection section is not removed if only one card is dismissed.
- The collection section is removed from the "about:newtab" page after the second card is dismissed.

Verified using the latest Firefox Nightly (80.0a1 Build ID - 20200722094100) installed on Windows 10 x64, Mac 10.15, and Ubuntu 18.04 x64.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: