Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Bug 1797577 - Add cookie banner handling panel to the toolbar. #28044

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

Amejia481
Copy link
Contributor

@Amejia481 Amejia481 commented Dec 1, 2022

Cookie banner handling is ON

Cookie banner handling is OFF

Cookie banner handling is ON

Cookie banner handling is OFF

Pull Request checklist

  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.

QA

  • QA Needed

To download an APK when reviewing a PR (after all CI tasks finished running):

  1. Click on Checks at the top of the PR page.
  2. Click on the firefoxci-taskcluster group on the left to expand all tasks.
  3. Click on the build-debug task.
  4. Click on View task in Taskcluster in the new DETAILS section.
  5. The APK links should be on the right side of the screen, named for each CPU architecture.

GitHub Automation

Used by GitHub Actions.

@Amejia481 Amejia481 added needs:data-review PR is awaiting a data review needs:review PRs that need to be reviewed labels Dec 1, 2022
@Amejia481 Amejia481 requested review from a team as code owners December 1, 2022 14:47
@Amejia481 Amejia481 removed request for a team December 1, 2022 14:47
@Amejia481 Amejia481 force-pushed the bug-1797577 branch 4 times, most recently from 9fff964 to e17b085 Compare December 1, 2022 21:22
@Amejia481 Amejia481 closed this Dec 1, 2022
@Amejia481 Amejia481 reopened this Dec 1, 2022
@Amejia481
Copy link
Contributor Author

Request for data collection review form

All questions are mandatory. You must receive review from a data steward peer on your responses to these questions before shipping new data collection.

  1. What questions will you answer with this data?
  • How users interact with the cookie banners handling feature.
  1. Why does Mozilla need to answer these questions? Are there benefits for users? Do we need this information to address product or business requirements?
  • This data will help us understand how the cookie banners handling feature is used.
  1. What alternative methods did you consider to answer these questions? Why were they not sufficient?
  • There are no other alternatives.

  1. Can current instrumentation answer these questions?
  • No.

  1. List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories found on the Mozilla wiki.

    Note that the data steward reviewing your request will characterize your data collection based on the highest (and most sensitive) category.
Measurement Description Data Collection Category Tracking Bug #
A user added a cookie banner handling exception through the toggle in the protections panel Category 2 - interaction data https://bugzilla.mozilla.org/show_bug.cgi?id=1797577
A user removed a cookie banner handling exception through the toggle in the protections panel Category 2 - interaction data https://bugzilla.mozilla.org/show_bug.cgi?id=1797577
A user visited the cookie banner toolbar panel Category 2 - interaction data https://bugzilla.mozilla.org/show_bug.cgi?id=1797577
  1. Please provide a link to the documentation for this data collection which describes the ultimate data set in a public, complete, and accurate way.
  1. How long will this data be collected? Choose one of the following:
  • Until version 118. Renewal then may be decided.
  1. What populations will you measure?
  • All channels, all locales, all countries
 that the feature is active for.
  1. If this data collection is default on, what is the opt-out mechanism for users?
  • Default Glean SDK opt-out mechanism.

  1. Please provide a general description of how you will analyze this data.
  • Glean and Amplitude.

  1. Where do you intend to share the results of your analysis?
  • 
Only on Glean, Amplitude, and with mobile teams.

  1. Is there a third-party tool (i.e. not Telemetry) that you are proposing to use for this data collection?
  • No third-party tools.

@rocketsroger
Copy link
Contributor

Request for data collection review form

All questions are mandatory. You must receive review from a data steward peer on your responses to these questions before shipping new data collection.

1. What questions will you answer with this data?


* How users interact with the cookie banners handling feature.


2. Why does Mozilla need to answer these questions? Are there benefits for users? Do we need this information to address product or business requirements?


* This data will help us understand how the cookie banners handling feature is used.


3. What alternative methods did you consider to answer these questions? Why were they not sufficient?


* There are no other alternatives.


4. Can current instrumentation answer these questions?


* No.


5. List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories found on the Mozilla wiki.
   
   Note that the data steward reviewing your request will characterize your data collection based on the highest (and most sensitive) category.

Measurement Description Data Collection Category Tracking Bug #
A user added a cookie banner handling exception through the toggle in the protections panel Category 2 - interaction data https://bugzilla.mozilla.org/show_bug.cgi?id=1797577
A user removed a cookie banner handling exception through the toggle in the protections panel Category 2 - interaction data https://bugzilla.mozilla.org/show_bug.cgi?id=1797577
A user visited the cookie banner toolbar panel Category 2 - interaction data https://bugzilla.mozilla.org/show_bug.cgi?id=1797577

6. Please provide a link to the documentation for this data collection which describes the ultimate data set in a public, complete, and accurate way.


* [https://dictionary.telemetry.mozilla.org/apps/fenix
  ](https://dictionary.telemetry.mozilla.org/apps/fenix%E2%80%A8)


7. How long will this data be collected? Choose one of the following:


* Until version 118. Renewal then may be decided.


8. What populations will you measure?


* All channels, all locales, all countries
   that the feature is active for.


9. If this data collection is default on, what is the opt-out mechanism for users?


* Default Glean SDK opt-out mechanism.


10. Please provide a general description of how you will analyze this data.


* Glean and Amplitude.


11. Where do you intend to share the results of your analysis?


* Only on Glean, Amplitude, and with mobile teams.


12. Is there a third-party tool (i.e. not Telemetry) that you are proposing to use for this data collection?


* No third-party tools.

Data Review

  1. Is there or will there be documentation that describes the schema for the ultimate data set in a public, complete, and accurate way?

Yes, through the metrics.yaml file and the Glean Dictionary

  1. Is there a control mechanism that allows the user to turn the data collection on and off?

Yes, through the "Send Usage Data" preference in the application settings

  1. If the request is for permanent data collection, is there someone who will monitor the data over time?

N/A, collection set to end or be renewed by version 118

  1. Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?

Category 2, Interaction data

  1. Is the data collection request for default-on or default-off?

default-on

  1. Does the instrumentation include the addition of any new identifiers?

No

  1. Is the data collection covered by the existing Firefox privacy notice?

Yes

  1. Does the data collection use a third-party collection tool?

No

Result

data-review+

@rocketsroger rocketsroger removed the needs:data-review PR is awaiting a data review label Dec 2, 2022
*
* @param context [Context] used for various Android interactions.
* @param sessionId [String] The current session ID.
* @param websiteUrl [String] the URL of the current web page.
* @param isTrackingProtectionEnabled [Boolean] Current status of tracking protection
* for this session.
* @param isCookieHandlingEnabled [Boolean] Current status of cookie banner handling.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param isCookieHandlingEnabled [Boolean] Current status of cookie banner handling.
* @param isCookieHandlingEnabled [Boolean] Current status of cookie banner handling

@gabrielluong
Copy link
Member

I have started looking at this and I think I can also pick up the review since I am familiar with the code here since I worked on it with Arturo on some of the changes back in MR 2021.

@mavduevskiy
Copy link
Contributor

just passing by, top padding inside the second pair of screenshots looks cropped. but I can't find the design for the reference

@Amejia481
Copy link
Contributor Author

just passing by, top padding inside the second pair of screenshots looks cropped. but I can't find the design for the reference

You can find the mockups here https://www.figma.com/file/FAZxkK9IRLlCqyhXBqId7e/Auto-Cookie-Banner-Consent-Desktop-%26-Mobile?node-id=910%3A27683&t=biamx5dzxBpgvX9r-0

@iorgamgabriel
Copy link
Contributor

iorgamgabriel commented Dec 6, 2022

Hi @Amejia481 , I tested the feature and I found three bugs .
1 .When you reload the website after you change the cookie banner exception value, the site doesn't have the same theme. I don't believe that is due to this patch; perhaps it happens in all cases when you reload the webpage. 
2.If you change the cookie banner exception value and then enter the same page in private mode, the cookie banner exception doesn't keep the selected value. The same thing is happening for custom tabs.

@iorgamgabriel
Copy link
Contributor

Screen_Recording_20221206-145407_Firefox.Fenix.mp4

@iorgamgabriel
Copy link
Contributor

Screen_Recording_20221206-172434_Firefox.Fenix.mp4

@Amejia481
Copy link
Contributor Author

Amejia481 commented Dec 7, 2022

Thanks for taking a look :) !

1 .When you reload the website after you change the cookie banner exception value, the site doesn't have the same theme. I don't believe that is due to this patch; perhaps it happens in all cases when you reload the webpage. 

Yeah, it looks like there a bug when we reload 🐞 , the same happens when you click the three dotted menu and press the reload icon, please feel free to file a bug.

2.If you change the cookie banner exception value and then enter the same page in private mode, the cookie banner exception doesn't keep the selected value. The same thing is happening for custom tabs.

This matches the same behaviour that Firefox desktop nightly has. You could verify by downloading desktop nightly and activating the cookie banner handling UI (about:config -> set cookiebanners.ui.desktop.enabled to true), then you will be able to see the CBH item on the protection panel, when clicking the shield icon.

Copy link
Member

@gabrielluong gabrielluong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a very brief review and nothing sticks out to me that hasn't already been mentioned. I will defer the final review to @iorgamgabriel

@gabrielluong gabrielluong removed their assignment Dec 7, 2022
@Amejia481 Amejia481 closed this Dec 7, 2022
@Amejia481 Amejia481 reopened this Dec 7, 2022
@iorgamgabriel
Copy link
Contributor

And for the incognito tab, it doesn't work.

@iorgamgabriel
Copy link
Contributor

Screen_Recording_20221208-131658_Firefox.Fenix.mp4

@Amejia481
Copy link
Contributor Author

And for the incognito tab, it doesn't work.

In this case, this is the expected behaviour same as Firefox desktop :)

See #28044 (comment) for more details

@Amejia481 Amejia481 added pr:needs-landing PRs that are ready to land [Will be merged by Mergify] and removed needs:review PRs that need to be reviewed labels Dec 8, 2022
@mergify mergify bot merged commit cc666c8 into mozilla-mobile:main Dec 8, 2022
@iorgamgabriel
Copy link
Contributor

iorgamgabriel commented Dec 8, 2022

So if for private mode doesn't work what is the point of this feature in Focus ? Only when you stay in screen , it's kind of useless. @Amejia481

@Amejia481
Copy link
Contributor Author

So if for private mode doesn't work what is the point of this feature in Focus ? Only when you stay in screen , it's kind of useless. @Amejia481

Yeah, at the moment it's only for collecting feedback until the platform ticket is addressed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature:CookieBannerHandling pr:needs-landing PRs that are ready to land [Will be merged by Mergify]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants