mozilla / activity-stream

A refreshed "new tab page" for Firefox
Mozilla Public License 2.0
182 stars 113 forks source link

Bug 1589653 - Provide bookmark object to targeting expression #5361

Closed piatra closed 4 years ago

piatra commented 4 years ago

The issue is that bookmark-icon-updated is also triggered when adding a bookmark not only when visiting a bookmarked URL and this results in showing the message at an undesired time. I didn't want to make a super specific "opened-already-bookmarked-url" trigger so instead I'm passing in through the context parameter of the trigger the bookmark object associated with the current url. This contains:

title,
url,
_lastModified_,
...

We can then use this information inside of the targeting expression currentDate|date - bookmark.lastModified > 60 * 60. It can potentially allow us to do other interesting messages bookmark.url in [list of web developer resources] => show some new devtools feature?

Note: yes this prevents us from shipping the Bookmarked URL Relationships CFR but this was already blocked by not shipping the groups feature in 71. We cannot prevent the bookmark panel doorhanger and this CFR from showing up at the same time without the groups frequency cap feature.

piatra commented 4 years ago

Moved to https://phabricator.services.mozilla.com/D51881.

piatra commented 4 years ago

Moved to https://phabricator.services.mozilla.com/D51881.