Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes the disappearing breakage form #1068

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

mgurgel
Copy link
Collaborator

@mgurgel mgurgel commented Nov 8, 2024

Please review the release process for BrowserServicesKit here.

Required:

Task/Issue URL: https://app.asana.com/0/1206594217596623/1208729801503622/f
iOS PR:
macOS PR:
What kind of version bump will this require?: Major/Minor/Patch

Optional:

CC: @jaceklyp

Description:

When triggering window.onGetToggleReportOptionsResponse on the Privacy Dashboard, the native side would create a variable json in the global scope before sending it as a parameter to the callback. If GetToggleReportOptionsResponse was even invoked again in the same webview, the attempt to declare another variable with the same name (json) would result in a fatal error.

This PR removes the declaration of the json variable, instead passing the data directly as a parameter to the callback.

Steps to test this PR:

  1. Check out branch jacek/new-breakage-form of the iOS app
  2. Set BSK to point to mgurgel/new-breakage-form
  3. Run the app
  4. Click on three dots menu
  5. Select Report Broken Site
  6. Choose a category and a subcategory
  7. The form should be visible
  8. Navigate back to category selection page
  9. Choose a category again
  10. The form should still be visible

<!—
Before submitting a PR, please ensure you have tested the combinations you expect the reviewer to test, then delete configurations you know do not need explicit testing.

Using a simulator where a physical device is unavailable is acceptable.
—>

OS Testing:

  • iOS 14
  • iOS 15
  • iOS 16
  • macOS 10.15
  • macOS 11
  • macOS 12

Internal references:

Software Engineering Expectations
Technical Design Template

@mgurgel mgurgel requested a review from jaceklyp November 8, 2024 20:04
@jaceklyp
Copy link
Contributor

jaceklyp commented Nov 9, 2024

nice finding!

@mgurgel mgurgel merged commit ee1fe31 into jacek/new-breakage-form Nov 12, 2024
6 of 8 checks passed
@mgurgel mgurgel deleted the mgurgel/new-breakage-form branch November 12, 2024 16:46
mgurgel added a commit that referenced this pull request Dec 13, 2024
<!--
Note: This checklist is a reminder of our shared engineering
expectations.
-->

Please review the release process for BrowserServicesKit
[here](https://app.asana.com/0/1200194497630846/1200837094583426).

**Required**:

Task/Issue URL:
https://app.asana.com/0/1206594217596623/1208729801503622/f
iOS PR: 
macOS PR: 
What kind of version bump will this require?: Major/Minor/Patch

**Optional**:

CC: @jaceklyp 

**Description**:


When triggering `window.onGetToggleReportOptionsResponse` on the Privacy
Dashboard, the native side would create a variable `json` in the global
scope before sending it as a parameter to the callback. If
GetToggleReportOptionsResponse was even invoked again in the same
webview, the attempt to declare another variable with the same name
(`json`) would result in a fatal error.

This PR removes the declaration of the `json` variable, instead passing
the data directly as a parameter to the callback.

**Steps to test this PR**:
1. Check out branch `jacek/new-breakage-form` of the iOS app
2. Set BSK to point to `mgurgel/new-breakage-form`
3. Run the app
4. Click on three dots menu 
5. Select Report Broken Site
6. Choose a category and a subcategory
7. The form should be visible
8. Navigate back to category selection page
9. Choose a category again
10. The form should still be visible

<!—
Before submitting a PR, please ensure you have tested the combinations
you expect the reviewer to test, then delete configurations you *know*
do not need explicit testing.

Using a simulator where a physical device is unavailable is acceptable.
—>

**OS Testing**:

* [ ] iOS 14
* [ ] iOS 15
* [ ] iOS 16
* [ ] macOS 10.15
* [ ] macOS 11
* [ ] macOS 12

—
###### Internal references:
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
mgurgel added a commit that referenced this pull request Dec 17, 2024
<!--
Note: This checklist is a reminder of our shared engineering
expectations.
-->

Please review the release process for BrowserServicesKit
[here](https://app.asana.com/0/1200194497630846/1200837094583426).

**Required**:

Task/Issue URL:
https://app.asana.com/0/1206594217596623/1208729801503622/f
iOS PR: 
macOS PR: 
What kind of version bump will this require?: Major/Minor/Patch

**Optional**:

CC: @jaceklyp 

**Description**:


When triggering `window.onGetToggleReportOptionsResponse` on the Privacy
Dashboard, the native side would create a variable `json` in the global
scope before sending it as a parameter to the callback. If
GetToggleReportOptionsResponse was even invoked again in the same
webview, the attempt to declare another variable with the same name
(`json`) would result in a fatal error.

This PR removes the declaration of the `json` variable, instead passing
the data directly as a parameter to the callback.

**Steps to test this PR**:
1. Check out branch `jacek/new-breakage-form` of the iOS app
2. Set BSK to point to `mgurgel/new-breakage-form`
3. Run the app
4. Click on three dots menu 
5. Select Report Broken Site
6. Choose a category and a subcategory
7. The form should be visible
8. Navigate back to category selection page
9. Choose a category again
10. The form should still be visible

<!—
Before submitting a PR, please ensure you have tested the combinations
you expect the reviewer to test, then delete configurations you *know*
do not need explicit testing.

Using a simulator where a physical device is unavailable is acceptable.
—>

**OS Testing**:

* [ ] iOS 14
* [ ] iOS 15
* [ ] iOS 16
* [ ] macOS 10.15
* [ ] macOS 11
* [ ] macOS 12

—
###### Internal references:
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
mgurgel added a commit that referenced this pull request Jan 7, 2025
<!--
Note: This checklist is a reminder of our shared engineering
expectations.
-->

Please review the release process for BrowserServicesKit
[here](https://app.asana.com/0/1200194497630846/1200837094583426).

**Required**:

Task/Issue URL:
https://app.asana.com/0/1206594217596623/1208729801503622/f
iOS PR: 
macOS PR: 
What kind of version bump will this require?: Major/Minor/Patch

**Optional**:

CC: @jaceklyp 

**Description**:


When triggering `window.onGetToggleReportOptionsResponse` on the Privacy
Dashboard, the native side would create a variable `json` in the global
scope before sending it as a parameter to the callback. If
GetToggleReportOptionsResponse was even invoked again in the same
webview, the attempt to declare another variable with the same name
(`json`) would result in a fatal error.

This PR removes the declaration of the `json` variable, instead passing
the data directly as a parameter to the callback.

**Steps to test this PR**:
1. Check out branch `jacek/new-breakage-form` of the iOS app
2. Set BSK to point to `mgurgel/new-breakage-form`
3. Run the app
4. Click on three dots menu 
5. Select Report Broken Site
6. Choose a category and a subcategory
7. The form should be visible
8. Navigate back to category selection page
9. Choose a category again
10. The form should still be visible

<!—
Before submitting a PR, please ensure you have tested the combinations
you expect the reviewer to test, then delete configurations you *know*
do not need explicit testing.

Using a simulator where a physical device is unavailable is acceptable.
—>

**OS Testing**:

* [ ] iOS 14
* [ ] iOS 15
* [ ] iOS 16
* [ ] macOS 10.15
* [ ] macOS 11
* [ ] macOS 12

—
###### Internal references:
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
mgurgel added a commit that referenced this pull request Jan 9, 2025
<!--
Note: This checklist is a reminder of our shared engineering
expectations.
-->

Please review the release process for BrowserServicesKit
[here](https://app.asana.com/0/1200194497630846/1200837094583426).

**Required**:

Task/Issue URL:
https://app.asana.com/0/1206594217596623/1208729801503622/f
iOS PR: 
macOS PR: 
What kind of version bump will this require?: Major/Minor/Patch

**Optional**:

CC: @jaceklyp 

**Description**:


When triggering `window.onGetToggleReportOptionsResponse` on the Privacy
Dashboard, the native side would create a variable `json` in the global
scope before sending it as a parameter to the callback. If
GetToggleReportOptionsResponse was even invoked again in the same
webview, the attempt to declare another variable with the same name
(`json`) would result in a fatal error.

This PR removes the declaration of the `json` variable, instead passing
the data directly as a parameter to the callback.

**Steps to test this PR**:
1. Check out branch `jacek/new-breakage-form` of the iOS app
2. Set BSK to point to `mgurgel/new-breakage-form`
3. Run the app
4. Click on three dots menu 
5. Select Report Broken Site
6. Choose a category and a subcategory
7. The form should be visible
8. Navigate back to category selection page
9. Choose a category again
10. The form should still be visible

<!—
Before submitting a PR, please ensure you have tested the combinations
you expect the reviewer to test, then delete configurations you *know*
do not need explicit testing.

Using a simulator where a physical device is unavailable is acceptable.
—>

**OS Testing**:

* [ ] iOS 14
* [ ] iOS 15
* [ ] iOS 16
* [ ] macOS 10.15
* [ ] macOS 11
* [ ] macOS 12

—
###### Internal references:
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
mgurgel added a commit that referenced this pull request Jan 14, 2025
<!--
Note: This checklist is a reminder of our shared engineering
expectations.
-->

Please review the release process for BrowserServicesKit
[here](https://app.asana.com/0/1200194497630846/1200837094583426).

**Required**:

Task/Issue URL:
https://app.asana.com/0/1206594217596623/1208729801503622/f
iOS PR: 
macOS PR: 
What kind of version bump will this require?: Major/Minor/Patch

**Optional**:

CC: @jaceklyp 

**Description**:


When triggering `window.onGetToggleReportOptionsResponse` on the Privacy
Dashboard, the native side would create a variable `json` in the global
scope before sending it as a parameter to the callback. If
GetToggleReportOptionsResponse was even invoked again in the same
webview, the attempt to declare another variable with the same name
(`json`) would result in a fatal error.

This PR removes the declaration of the `json` variable, instead passing
the data directly as a parameter to the callback.

**Steps to test this PR**:
1. Check out branch `jacek/new-breakage-form` of the iOS app
2. Set BSK to point to `mgurgel/new-breakage-form`
3. Run the app
4. Click on three dots menu 
5. Select Report Broken Site
6. Choose a category and a subcategory
7. The form should be visible
8. Navigate back to category selection page
9. Choose a category again
10. The form should still be visible

<!—
Before submitting a PR, please ensure you have tested the combinations
you expect the reviewer to test, then delete configurations you *know*
do not need explicit testing.

Using a simulator where a physical device is unavailable is acceptable.
—>

**OS Testing**:

* [ ] iOS 14
* [ ] iOS 15
* [ ] iOS 16
* [ ] macOS 10.15
* [ ] macOS 11
* [ ] macOS 12

—
###### Internal references:
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
mgurgel added a commit that referenced this pull request Jan 17, 2025
<!--
Note: This checklist is a reminder of our shared engineering
expectations.
-->

Please review the release process for BrowserServicesKit
[here](https://app.asana.com/0/1200194497630846/1200837094583426).

**Required**:

Task/Issue URL:
https://app.asana.com/0/1206594217596623/1208729801503622/f
iOS PR: 
macOS PR: 
What kind of version bump will this require?: Major/Minor/Patch

**Optional**:

CC: @jaceklyp 

**Description**:


When triggering `window.onGetToggleReportOptionsResponse` on the Privacy
Dashboard, the native side would create a variable `json` in the global
scope before sending it as a parameter to the callback. If
GetToggleReportOptionsResponse was even invoked again in the same
webview, the attempt to declare another variable with the same name
(`json`) would result in a fatal error.

This PR removes the declaration of the `json` variable, instead passing
the data directly as a parameter to the callback.

**Steps to test this PR**:
1. Check out branch `jacek/new-breakage-form` of the iOS app
2. Set BSK to point to `mgurgel/new-breakage-form`
3. Run the app
4. Click on three dots menu 
5. Select Report Broken Site
6. Choose a category and a subcategory
7. The form should be visible
8. Navigate back to category selection page
9. Choose a category again
10. The form should still be visible

<!—
Before submitting a PR, please ensure you have tested the combinations
you expect the reviewer to test, then delete configurations you *know*
do not need explicit testing.

Using a simulator where a physical device is unavailable is acceptable.
—>

**OS Testing**:

* [ ] iOS 14
* [ ] iOS 15
* [ ] iOS 16
* [ ] macOS 10.15
* [ ] macOS 11
* [ ] macOS 12

—
###### Internal references:
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants