Set report flow to form when launchiung hybrid site from the prompt#5324
Merged
CrisBarreiro merged 3 commits intodevelopfrom Nov 28, 2024
Merged
Set report flow to form when launchiung hybrid site from the prompt#5324CrisBarreiro merged 3 commits intodevelopfrom
CrisBarreiro merged 3 commits intodevelopfrom
Conversation
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
e95a1cd to
d8bdb6c
Compare
lmac012
approved these changes
Nov 28, 2024
Contributor
lmac012
left a comment
There was a problem hiding this comment.
Left a couple of comments, but those are small nits. Looks good overall and works as expected.
| @@ -96,7 +96,13 @@ class PrivacyDashboardHybridActivity : DuckDuckGoActivity() { | |||
| onSubmitBrokenSiteReport = { payload -> | |||
| val reportFlow = when (params) { | |||
Contributor
There was a problem hiding this comment.
nit: you could assign params to local variable to avoid having to manually cast a few lines below
Suggested change
| val reportFlow = when (params) { | |
| val reportFlow = when (val params = params) { |
Comment on lines
+100
to
+104
| if ((params as BrokenSiteForm).reportFlow == BrokenSiteForm.BrokenSiteFormReportFlow.MENU) { | ||
| ReportFlow.MENU | ||
| } else { | ||
| ReportFlow.PROMPT | ||
| } |
Contributor
There was a problem hiding this comment.
nit: You could map both values here explicitly, so that when someone adds new value to BrokenSiteForm.BrokenSiteFormReportFlow enum, it won't get implicitly translated to ReportFlow.PROMPT
Suggested change
| if ((params as BrokenSiteForm).reportFlow == BrokenSiteForm.BrokenSiteFormReportFlow.MENU) { | |
| ReportFlow.MENU | |
| } else { | |
| ReportFlow.PROMPT | |
| } | |
| when (params.reportFlow) { | |
| BrokenSiteForm.BrokenSiteFormReportFlow.MENU -> ReportFlow.MENU | |
| BrokenSiteForm.BrokenSiteFormReportFlow.PROMPT -> ReportFlow.PROMPT | |
| } |
46aa3e3 to
1c7dbfa
Compare
1c7dbfa to
29e8164
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Task/Issue URL: https://app.asana.com/0/1163321984198618/1208852264436742/f
Description
Set report flow to form (not menu) when launching hybrid site from the prompt
Rename pixels according to spec
Steps to test this PR
Feature 1
reportFlowparameter onepbfpixel ispromptinstead ofmenuUI changes