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

Request personal data copy change #642

Merged
merged 7 commits into from
Apr 2, 2019
Merged

Conversation

cdolm92
Copy link
Contributor

@cdolm92 cdolm92 commented Mar 21, 2019

📲 What

New copy informs user of specific email account to check when requesting their data.

🛠 How

Graph call to fetch user email in SettingsRequestDataCellViewModel

👀 See

Before 🐛 After 🦋
Simulator Screen Shot - iPhone 8 - 2019-03-21 at 15 36 40 Simulator Screen Shot - iPhone 8 - 2019-04-01 at 13 33 10

✅ Acceptance criteria

  • Navigate to Settings > Account > Privacy > Request my Personal Data
  • Alert should present w/ copy that reads "You'll receive an email at [account email] when your download is ready."
  • CTA on alert should read "Request my data"

Copy link
Contributor

@Scollaco Scollaco left a comment

Choose a reason for hiding this comment

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

Looking good, @cdolm92 . I just left a small suggestion to improve the readability of an existent code.

let exportEnvelope = initialUser
.switchMap { _ in
AppEnvironment.current.apiService.exportDataState()
.demoteErrors()
}

self.showRequestDataPrompt = exportEnvelope
self.showRequestDataPrompt = Signal.combineLatest(exportEnvelope, requestDataAlertText)
.filter { $0.0.dataUrl == nil || $0.0.state == .expired || $0.0.expiresAt == nil }
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you touched this code, I think we can improve the readability of it by extracting the logic to a new function

private func canRequestData(_ envelope: ExportDataEnvelope) -> Bool {
  return envelope.dataUrl == nil || envelope.state == .expired || envelope.expiresAt == nil
}

and simply filter using .filter { canRequestData(0.0) }

@dusi dusi added blocked a PR that is blocked for external reasons and removed needs review labels Mar 28, 2019
@cdolm92 cdolm92 requested a review from Scollaco April 1, 2019 16:55
@cdolm92 cdolm92 added ready to merge and removed blocked a PR that is blocked for external reasons labels Apr 2, 2019
@cdolm92 cdolm92 merged commit 70f8ba2 into master Apr 2, 2019
@cdolm92 cdolm92 deleted the request-personal-data-copy-change branch April 2, 2019 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants