Exclude URLs with the AMP query parameter from appearing as tiles on the new tab page
Categories
(Firefox :: New Tab Page, task, P1)
Tracking
()
People
(Reporter: adw, Assigned: adw)
References
Details
Attachments
(2 files)
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-release+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-release+
|
Details | Review |
We want to exclude URLs with the AMP query parameter from appearing as tiles on the new tab page. See https://mozilla-hub.atlassian.net/browse/SNT-130 for more info.
This work can begin before the query parameter is finalized. We can use a placeholder in the meantime. I'll file another bug for replacing the placeholder with the final parameter once it's decided.
Assignee | ||
Comment 1•2 years ago
|
||
This modifies ActivityStreamProvider.getTopFrecentSites()
so it excludes URLs
with a given search param. There are two questions I considered when writing
this patch:
- The top-sites code is a little complex and there are multiple places where
this logic could be implemented. I chose the bottommost layer, where the top
sites are fetched from Places and some other exclusion logic already exists,
because we don't want these URLs to appear in any list of top sites in Firefox
AFAIK -- not on the new-tab page and not in the urlbar. - How should we encode this new exclusion logic? We don't want to hardcode a
specific search param. We may not even want to base it on search params at all
but instead make it more general somehow. For now, I did the simple thing and
went ahead and based it on a search param, and I added a new option to
getTopFrecentSites()
that specifies the param and that falls back to a new
pref. Callers can override the pref fallback by passing in an option.
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c884b25c2920 Exclude URLs with a particular search param from appearing as tiles on the new-tab page. r=nanj
Assignee | ||
Comment 3•2 years ago
|
||
STR for QA
This new feature will prevent URLs from becoming top sites on the new tab page depending on whether they have certain search parameters, e.g., ?test=foo
. Verification involves loading pages with and without the search parameter and making sure they appear or don't appear as top sites.
For each case below, please clear your history or use a new profile so that previous cases don't affect the next one.
Case 1
- Type
example.com/?test=foo
in the urlbar and press enter - Type
https://www.mozilla.org/
in the urlbar and press enter. You can use the same tab. - Restart Firefox
- Verify "mozilla" and "example" appear as top sites tiles on the new tab page
- Click the "example" tile
- Verify
example.com/?test=foo
loads
Case 2
- Set
browser.newtabpage.activity-stream.hideTopSitesWithSearchParam
totest=foo
- Type
example.com/?test=foo
in the urlbar and press enter - Repeat the previous step 2 more times. You can use the same tab.
- Restart Firefox
- Verify "example" does not appear as a top sites tile on the new tab page
- Type
example.com
(without anything else at the end) in the urlbar and press enter - Type
https://www.mozilla.org/
in the urlbar and press enter. You can use the same tab. - Restart Firefox
- Verify "mozilla" and "example" appear as top sites tiles on the new tab page
- Click the "example" tile
- Verify
example.com
(without anything else at the end) loads
Case 3
- Set
browser.newtabpage.activity-stream.hideTopSitesWithSearchParam
totest=foo
- Type
example.com/?test=foo
in the urlbar and press enter - Repeat the previous step 2 more times. You can use the same tab.
- Restart Firefox
- Verify "example" does not appear as a top sites tile on the new tab page
- Type
example.com/?test=bar
in the urlbar and press enter - Type
https://www.mozilla.org/
in the urlbar and press enter. You can use the same tab. - Restart Firefox
- Verify "mozilla" and "example" appear as top sites tiles on the new tab page
- Click the "example" tile
- Verify
example.com/?test=bar
(notexample.com/?test=foo
) loads
Case 4
- Set
browser.newtabpage.activity-stream.hideTopSitesWithSearchParam
totest
- Type
example.com/?test=foo
in the urlbar and press enter - Repeat the previous step 2 more times. You can use the same tab.
- Type
example.com/?test
in the urlbar and press enter - Repeat the previous step 2 more times. You can use the same tab.
- Restart Firefox
- Verify "example" does not appear as a top sites tile on the new tab page
- Type
example.com
(without anything else at the end) in the urlbar and press enter - Type
https://www.mozilla.org/
in the urlbar and press enter. You can use the same tab. - Restart Firefox
- Verify "mozilla" and "example" appear as top sites tiles on the new tab page
- Click the "example" tile
- Verify
example.com
(without anything else at the end) loads
Comment 5•2 years ago
|
||
Thunderbird doesn't have the pref => test failures:
https://treeherder.mozilla.org/logviewer?job_id=377954876&repo=comm-central&lineNumber=5509
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/373262dddf80 use default param value for hideTopSitesWithSearchParam. r=adw
Comment 7•2 years ago
|
||
bugherder |
Comment 8•2 years ago
•
|
||
I‘ve verified this task using the latest Firefox Nightly 102.0a1 (Build ID: 20220515214519) on Windows 10 x64, macOS 12.3.1, and Ubuntu 20.04 x64.
-
Case 1:
- The "mozilla" and "example" appear as top sites tiles on the new tab page after navigating to the “example.com/?test=foo” and “https://www.mozilla.org/” pages.
- The “example.com/?test=foo” page loads after clicking on the “example” top site tile.
-
Case 2:
- After navigating to the “example.com/?test=foo” page several times, the "example" does not appear as a top sites tile on the new tab page if the “browser.newtabpage.activity-stream.hideTopSitesWithSearchParam” pref is set to the “test=foo” value.
- The "mozilla" and "example" appear as top sites tiles on the new tab page after navigating to the “example.com” and “https://www.mozilla.org/” pages. Also, the “example.com” page loads after clicking the “example” top site tile.
-
Case 3:
- After navigating to the “example.com/?test=foo” page several times, the "example" does not appear as a top sites tile on the new tab page if the “browser.newtabpage.activity-stream.hideTopSitesWithSearchParam” pref is set to the “test=foo” value.
- The "mozilla" and "example" appear as top sites tiles on the new tab page after navigating to the “example.com/?test=bar” and “https://www.mozilla.org/” pages. Also, the “example.com/?test=bar” page loads after clicking the “example” top site tile.
-
Case 4:
- After navigating to the “example.com/?test=foo” and “example.com/?test” pages several times, the "example" does not appear as a top sites tile on the new tab page if the “browser.newtabpage.activity-stream.hideTopSitesWithSearchParam” pref is set to the “test” value.
- The "mozilla" and "example" appear as top sites tiles on the new tab page after navigating to the “example.com” and “https://www.mozilla.org/” pages. Also, the “example.com” page loads after clicking the “example” top site tile.
Comment 9•2 years ago
|
||
[Tracking Requested - why for this release]: This patch implements a feature request for our tiles partner, and we'd like it to be released in Fx 101 if possible.
Comment 10•2 years ago
|
||
Comment on attachment 9276180 [details]
Bug 1768529 - Exclude URLs with a particular search param from appearing as tiles on the new-tab page.
Beta/Release Uplift Approval Request
- User impact if declined: There is little impact on Firefox users, rather it's a feature request from our partner of sponsored tiles. If declined, Firefox would show previous sponsored tiles as organic tiles which could de-value the sponsored tiles for both our partner and Mozilla.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: Bug 1768533
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Not a user-facing change, it only changes how previous sponsored tiles will be treated for Top Sites on the newtab page.
- String changes made/needed: None
- Is Android affected?: No
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 11•2 years ago
|
||
Comment on attachment 9276180 [details]
Bug 1768529 - Exclude URLs with a particular search param from appearing as tiles on the new-tab page.
Approved for 101.0rc2.
Updated•2 years ago
|
Comment 12•2 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-release/rev/f4a6e4a1c3c1
https://hg.mozilla.org/releases/mozilla-release/rev/17a11eee4c39
Comment 13•2 years ago
|
||
We have verified this issue on Firefox 101.0 RC2 build (Build ID: 20220525210143) downloaded from treeherder on Windows 10 x64, macOS 10.15.7 and Ubuntu 20.04.
- In order to verify this issue we have used the STR described in comment 3. During testing, we haven't found any new issues.
Description
•