Skip to content

Issue/13326 get free estimate#13938

Merged
malinajirka merged 4 commits intodevelopfrom
issue/13326-get-free-estimate
Feb 3, 2021
Merged

Issue/13326 get free estimate#13938
malinajirka merged 4 commits intodevelopfrom
issue/13326-get-free-estimate

Conversation

@malinajirka
Copy link
Copy Markdown
Contributor

@malinajirka malinajirka commented Feb 2, 2021

Parent issue #13326

This PR implements "get free estimate" action which is shown on ThreatDetail screen for non-fixable threats.

To test:
Prerequisites:

  • enable scan feature flag
  • select a site which either has a current non-fixable threat or it has a non-fixable threat in Scan History (eg. pressable-jetpack-daily-scan)
  1. Open scan
  2. Optional: (Open Scan History)
  3. Open detail of a non-fixable ignored threat
  4. Click on the "Get free estimate" button
  5. Notice the app redirects you to an external webview

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@malinajirka malinajirka added this to the 16.7 milestone Feb 2, 2021
@malinajirka malinajirka requested a review from a team February 2, 2021 10:41
@malinajirka malinajirka self-assigned this Feb 2, 2021
@malinajirka malinajirka requested review from zwarm and removed request for a team February 2, 2021 10:41
@peril-wordpress-mobile
Copy link
Copy Markdown

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link
Copy Markdown

You can test the changes on this Pull Request by downloading the APK here.

@malinajirka malinajirka mentioned this pull request Feb 2, 2021
67 tasks
@zwarm zwarm self-assigned this Feb 2, 2021
Copy link
Copy Markdown
Contributor

@zwarm zwarm left a comment

Choose a reason for hiding this comment

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

@malinajirka - Looks good 🎈 - all works as expected, external browser launched correctly. I left one question/comment on hardcoding, but it won't hold up the merge. Just a thought for the future.

data class ShowUpdatedFixState(val threatId: Long) : ThreatDetailsNavigationEvents()

object ShowGetFreeEstimate : ThreatDetailsNavigationEvents() {
const val url = "https://codeable.io/partners/jetpack-scan/"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

❓ - Do we have an alternative for hardcoding or is this sufficient for the MVP? Post MVP 🤔 perhaps an endpoint similar to jetpack capabilities, but for upsells?

Copy link
Copy Markdown
Contributor Author

@malinajirka malinajirka Feb 3, 2021

Choose a reason for hiding this comment

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

I asked the same question yesterday on Slack - tbh I'm not sure. I don't like hardcoding urls - especially 3rd party. The 3rd party can change the url and we'll never be able to remove it from this version of the app.
I was thinking if we could for example point to our url and redirect from there. Downsides of this approach is that some browsers might complain and suppress the redirect to a different domain.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll merge this PR and update the code if we make a different decision on Slack.

@malinajirka malinajirka merged commit d020aeb into develop Feb 3, 2021
@malinajirka malinajirka deleted the issue/13326-get-free-estimate branch February 3, 2021 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants