Skip to content

Commit

Permalink
Tracking branch for all of Uplift's changes. (#50)
Browse files Browse the repository at this point in the history
* Remove option to request a copy of report.

* Rename to TT Reporter and other copy changes (#45)

* Change studies availabled based on locaation copy

* Rename TikTok Reporter to TT Reporter

* Change report to share

* Fix TikTok Repoter to TT Reporter

* Change product name

* Update README.

* Update images to TT Reporter.

* Privacy policy and data download updates (#47)

* Hide subtitle if policy doesn't have one.

* Request email in data download, if not provided.

* Show privacy policy link on settings email forms.

* Add option to remove email address in settings.

* Update copy and remove upload key from code. (#49)

* Rename to FYP reporter.

* Update about page and upload URL.

* Hide submit report button until there is a recording.

* Rename Screen Capture service to FYP

* Update screen capture instructions

* Update AppIcon and images.

---------

Co-authored-by: Marius Craciunoiu <[email protected]>
  • Loading branch information
pcraciunoiu and mariusc23 authored Apr 26, 2024
1 parent eb5dfce commit 2657722
Show file tree
Hide file tree
Showing 56 changed files with 372 additions and 189 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# TikTok Reporter
# FYP Reporter

This is the Mozilla repository for the TikTok Reporter iOS application.
This is the Mozilla repository for the FYP Reporter iOS application.


## Run Locally
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// BroadcastUploadHelpers.h
// TikTok ReporterScreenCapture
// FYP ReporterScreenCapture
//
// Created by Emrah Korkmaz on 16.02.2024.
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// BroadcastUploadHelpers.m
// TikTok ReporterScreenCapture
// FYP ReporterScreenCapture
//
// Created by Emrah Korkmaz on 16.02.2024.
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// SampleHandler.swift
// TikTok ReporterScreenCapture
// FYP ReporterScreenCapture
//
// Created by Sergiu Ghiran on 22.11.2023.
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// BroadcastSetupViewController.swift
// TikTok ReporterScreenCaptureSetupUI
// FYP ReporterScreenCaptureSetupUI
//
// Created by Sergiu Ghiran on 22.11.2023.
//
Expand Down
136 changes: 68 additions & 68 deletions TikTok Reporter/TikTok Reporter.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "68CBF9642AEB9F2F006D03FC"
BuildableName = "TikTok Reporter.app"
BuildableName = "FYP Reporter.app"
BlueprintName = "TikTok Reporter"
ReferencedContainer = "container:TikTok Reporter.xcodeproj">
</BuildableReference>
Expand Down Expand Up @@ -68,7 +68,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "68CBF9642AEB9F2F006D03FC"
BuildableName = "TikTok Reporter.app"
BuildableName = "FYP Reporter.app"
BlueprintName = "TikTok Reporter"
ReferencedContainer = "container:TikTok Reporter.xcodeproj">
</BuildableReference>
Expand All @@ -85,7 +85,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "68CBF9642AEB9F2F006D03FC"
BuildableName = "TikTok Reporter.app"
BuildableName = "FYP Reporter.app"
BlueprintName = "TikTok Reporter"
ReferencedContainer = "container:TikTok Reporter.xcodeproj">
</BuildableReference>
Expand Down
2 changes: 1 addition & 1 deletion TikTok Reporter/TikTok Reporter/Generated/Metrics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extension GleanMetrics {
// Intentionally left private, no external user can instantiate a new global object.
}

public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 3, day: 7, hour: 21, minute: 44, second: 7))
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 4, day: 23, hour: 22, minute: 8, second: 25))
}

enum DownloadData {
Expand Down
8 changes: 7 additions & 1 deletion TikTok Reporter/TikTok Reporter/Helpers/PreviewHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ enum PreviewHelper {
FormItem(id: "311", label: nil, description: nil, isRequired: true, field: .textField(TextFieldFormField(placeholder: "TikTok link", maxLines: 1, multiline: false , isTikTokLink: false))),
FormItem(id: "312", label: nil, description: "Choose a category in which the video you want to report can be included. If you don’t find the category in the list, choose “other”.", isRequired: true, field: .dropDown(DropDownFormField(placeholder: "Category", options: [DropDownOption(id: "3121", title: "Option 1"), DropDownOption(id: "3122", title: "Option 2")], selected: "3121", hasOtherOption: true))),
FormItem(id: "313", label: "Severity", description: nil, isRequired: true, field: .slider(SliderFormField(max: 5, step: 1, leftLabel: "LOW", rightLabel: "HIGH")))
])
]),
dataDownloadForm: Form(
id: "32",
name: "Data handling form",
fields: [
FormItem(id: "314", label: nil, description: nil, isRequired: true, field: .textField(TextFieldFormField(placeholder: "Email address", maxLines: 1, multiline: false , isTikTokLink: false))),
])
)

static let mockOnboarding = Onboarding(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ final class AppStateManager: ObservableObject {
self.emailAddress = nil
}

func clearEmail() {
userDefaults?.removeObject(forKey: AppStateKey.emailAddress.rawValue)
self.emailAddress = nil
}

// MARK: - Onboarding

func setOnboarding(with study: Study) {
Expand Down
2 changes: 1 addition & 1 deletion TikTok Reporter/TikTok Reporter/Models/FormTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ enum FormTab: Equatable {

switch self {
case .reportLink:
return "Report a link"
return "Share a link"
case .recordSession:
return "Record a session"
}
Expand Down
1 change: 1 addition & 0 deletions TikTok Reporter/TikTok Reporter/Models/Study.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct Study: Codable {
let policies: [Policy]
let onboarding: Onboarding?
let form: Form?
let dataDownloadForm: Form?
}

struct CountryCode: Codable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Foundation

enum Constants {
enum URL {
static let baseURL: String = "https://tiktok-reporter-app-be-jbrlktowcq-ew.a.run.app/"
static let baseURL: String = "https://tiktok-reporter-app-be-tf52yqfkfq-uc.a.run.app/"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ enum RecordingAPI: APIRequest {
case let .uploadRecording(contentType, _):
return [
"Content-Type": contentType,
"X-API-Key": "c11442cb-790c-40f9-a357-a8205841e1f4"
"X-API-Key": ProcessInfo.processInfo.environment["FYP_REPORTER_UPLOAD_API_KEY"] ?? ""
]

case .getSignedUrlPath:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,14 +1,116 @@
{
"images" : [
{
"filename" : "Ios App Icon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
"images": [
{
"idiom": "iphone",
"size": "20x20",
"filename": "40.png",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "20x20",
"filename": "60.png",
"scale": "3x"
},
{
"idiom": "iphone",
"size": "29x29",
"filename": "58.png",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "29x29",
"filename": "87.png",
"scale": "3x"
},
{
"idiom": "iphone",
"size": "40x40",
"filename": "80.png",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "40x40",
"filename": "120.png",
"scale": "3x"
},
{
"idiom": "iphone",
"size": "60x60",
"filename": "120.png",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "60x60",
"filename": "180.png",
"scale": "3x"
},
{
"idiom": "ipad",
"size": "20x20",
"filename": "20.png",
"scale": "1x"
},
{
"idiom": "ipad",
"size": "20x20",
"filename": "40.png",
"scale": "2x"
},
{
"idiom": "ipad",
"size": "29x29",
"filename": "29.png",
"scale": "1x"
},
{
"idiom": "ipad",
"size": "29x29",
"filename": "58.png",
"scale": "2x"
},
{
"idiom": "ipad",
"size": "40x40",
"filename": "40.png",
"scale": "1x"
},
{
"idiom": "ipad",
"size": "40x40",
"filename": "80.png",
"scale": "2x"
},
{
"idiom": "ipad",
"size": "76x76",
"filename": "76.png",
"scale": "1x"
},
{
"idiom": "ipad",
"size": "76x76",
"filename": "152.png",
"scale": "2x"
},
{
"idiom": "ipad",
"size": "83.5x83.5",
"filename": "167.png",
"scale": "2x"
},
{
"idiom": "ios-marketing",
"size": "1024x1024",
"filename": "1024.png",
"scale": "1x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"images" : [
{
"filename" : "App header title (1).pdf",
"idiom" : "universal"
"filename" : "FYP-Reporter-Logo_FYP_Reporter_Primary-Outlined-Black-scaled.png",
"idiom" : "universal",
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"images" : [
{
"filename" : "TikTok-Reporter-Logo-06.pdf",
"idiom" : "universal"
"filename" : "FYP-Reporter-Logo_FYP_Reporter_Secondary-White-scaled.png",
"idiom" : "universal",
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,5 @@ private enum Strings {
static let fileName = "screenRecording.mp4"
static let appGroupID = "group.org.mozilla.ios.TikTok-Reporter"
static let appGroupFilePath = "Library/Documents/screenRecording.mp4"
static let signedURLBase = "https://storage.googleapis.com/regrets_reporter_recording_docs/"
static let signedURLBase = "https://storage.googleapis.com/ttreporter_recordings/"
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ struct RecordView: View {

VStack {

MainButton(text: Strings.submitTitle, type: .action) {
viewModel.submitRecording()
if viewModel.didUpdateMainField {
MainButton(text: Strings.submitTitle, type: .action) {
viewModel.submitRecording()
}
}

if viewModel.didUpdateMainField {
Expand Down Expand Up @@ -221,7 +223,7 @@ private enum Strings {
static let duration = "Duration:"
static let recordingDate = "Recorded on:"
static let commentsPlaceholder = "Comments(optional)"
static let noRecordingTitle = "To start screen recording, tap the button below. Then, open your TikTok app and record your session while you scroll the FYP. To stop recording, press the timer. You’ll be asked to share more information and submit this form."
static let noRecordingTitle = "Tap ‘Record my TikTok session’ to start screen recording. Select ‘FYP ReporterScreenCapture’ and tap ‘Start Broadcast’, then tap outside the dialog to dismiss it. Open TikTok and record your session while you scroll the For You Page (FYP). Once you’re done, tap ‘Stop Recording’ or the circle below (which will be colored red while recording is on). You’ll be asked to share more information and submit this form."
static let recordingTitle = "You’ve recorded a TikTok session. Fill out some information then submit the form."
static let submitReportWarning = "Create a recording in order to submit the report."
static let cancelReportAlertTitle = "Cancel Report?"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct OnboardingFormView: View {

@ObservedObject
var viewModel: ViewModel
@Environment(\.presentationMode) private var presentationMode

// MARK: - Body

Expand All @@ -35,6 +36,11 @@ struct OnboardingFormView: View {
emailView
buttons
}
.onReceive(viewModel.viewDismissalModePublisher) { isDataDownloaded in
if isDataDownloaded {
self.presentationMode.wrappedValue.dismiss()
}
}
}

private var emailView: some View {
Expand All @@ -45,7 +51,14 @@ struct OnboardingFormView: View {

FormView(formInputContainer: $viewModel.formUIContainer,
didUpdateMainField: $viewModel.didUpdateMainField,
shouldScrollToNonValidatedContext: $viewModel.shouldFormScrollToNonValidatedScope)
shouldScrollToNonValidatedContext: $viewModel.shouldFormScrollToNonValidatedScope,
hasVerticalPadding: .constant(false))
if (viewModel.appState.hasCompletedOnboarding) {
Text(viewModel.privacyPolicyText)
.font(.body2)
.tint(.blue)
.foregroundStyle(.black)
}
}
}
}
Expand All @@ -61,6 +74,12 @@ struct OnboardingFormView: View {
}
}

if viewModel.appState.hasCompletedOnboarding && viewModel.appState.emailAddress != nil && !viewModel.appState.emailAddress!.isEmpty {
MainButton(text: Strings.removeEmailTitle, type: .secondary) {
viewModel.removeEmail()
}
}

if viewModel.location == .onboarding {

MainButton(text: Strings.skipTitle, type: .secondary) {
Expand All @@ -83,4 +102,6 @@ struct OnboardingFormView: View {
private enum Strings {
static let saveTitle = "Save"
static let skipTitle = "Skip"
static let removeEmailTitle = "Remove email"
static let privacyPolicyMarkdown = "By providing your email address, you agree to Mozilla's [Privacy Notice](https://foundation.mozilla.org/en/fyp-reporter/privacy-notice/)."
}
Loading

0 comments on commit 2657722

Please sign in to comment.