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

Tweaks: Informational content restructure, Recording pips #35

Merged
merged 11 commits into from
May 1, 2020
12 changes: 8 additions & 4 deletions ORBIT Camera.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/* Begin PBXBuildFile section */
4B3119AB245091ED00E28452 /* Ink in Frameworks */ = {isa = PBXBuildFile; productRef = 4B3119AA245091ED00E28452 /* Ink */; };
4B3119AE2450977100E28452 /* TutorialScript.markdown in Resources */ = {isa = PBXBuildFile; fileRef = 4B3119AC2450977100E28452 /* TutorialScript.markdown */; };
4B3119AE2450977100E28452 /* Recording.markdown in Resources */ = {isa = PBXBuildFile; fileRef = 4B3119AC2450977100E28452 /* Recording.markdown */; };
4B3119B12451030B00E28452 /* UIColor+CSS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3119B02451030B00E28452 /* UIColor+CSS.swift */; };
4B3119B32451B06600E28452 /* String+slugify.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3119B22451B06600E28452 /* String+slugify.swift */; };
4B3119B52451E99D00E28452 /* HelpViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3119B42451E99C00E28452 /* HelpViewController.swift */; };
Expand Down Expand Up @@ -64,6 +64,7 @@
4BFC5F232458B12800E5A3C1 /* InformedConsent.markdown in Resources */ = {isa = PBXBuildFile; fileRef = 4BFC5F222458B12800E5A3C1 /* InformedConsent.markdown */; };
4BFC5F252459DA6000E5A3C1 /* Settings+secrets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BFC5F242459DA6000E5A3C1 /* Settings+secrets.swift */; };
4BFC5F27245B11A300E5A3C1 /* InfoViewController+requestCredential.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BFC5F26245B11A300E5A3C1 /* InfoViewController+requestCredential.swift */; };
4BFC5F29245B6BD600E5A3C1 /* Introduction.markdown in Resources */ = {isa = PBXBuildFile; fileRef = 4BFC5F28245B6BD600E5A3C1 /* Introduction.markdown */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -77,7 +78,7 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
4B3119AC2450977100E28452 /* TutorialScript.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = TutorialScript.markdown; path = Resources/TutorialScript.markdown; sourceTree = SOURCE_ROOT; };
4B3119AC2450977100E28452 /* Recording.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = Recording.markdown; path = Resources/Recording.markdown; sourceTree = SOURCE_ROOT; };
4B3119B02451030B00E28452 /* UIColor+CSS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+CSS.swift"; sourceTree = "<group>"; };
4B3119B22451B06600E28452 /* String+slugify.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+slugify.swift"; sourceTree = "<group>"; };
4B3119B42451E99C00E28452 /* HelpViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelpViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -127,6 +128,7 @@
4BFC5F222458B12800E5A3C1 /* InformedConsent.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = InformedConsent.markdown; path = Resources/InformedConsent.markdown; sourceTree = SOURCE_ROOT; };
4BFC5F242459DA6000E5A3C1 /* Settings+secrets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Settings+secrets.swift"; sourceTree = "<group>"; };
4BFC5F26245B11A300E5A3C1 /* InfoViewController+requestCredential.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "InfoViewController+requestCredential.swift"; sourceTree = "<group>"; };
4BFC5F28245B6BD600E5A3C1 /* Introduction.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = Introduction.markdown; path = Resources/Introduction.markdown; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -218,7 +220,8 @@
4BF14BBF2405730700E31D93 /* Main.storyboard */,
4BFC5F202458ACE200E5A3C1 /* ParticipantInformation.markdown */,
4BFC5F222458B12800E5A3C1 /* InformedConsent.markdown */,
4B3119AC2450977100E28452 /* TutorialScript.markdown */,
4BFC5F28245B6BD600E5A3C1 /* Introduction.markdown */,
4B3119AC2450977100E28452 /* Recording.markdown */,
4BF14BC22405730900E31D93 /* Assets.xcassets */,
4BF14BC42405730900E31D93 /* LaunchScreen.storyboard */,
4BF14BC72405730900E31D93 /* Info.plist */,
Expand Down Expand Up @@ -331,7 +334,8 @@
files = (
4BF14BC62405730900E31D93 /* LaunchScreen.storyboard in Resources */,
4BFC5F232458B12800E5A3C1 /* InformedConsent.markdown in Resources */,
4B3119AE2450977100E28452 /* TutorialScript.markdown in Resources */,
4BFC5F29245B6BD600E5A3C1 /* Introduction.markdown in Resources */,
4B3119AE2450977100E28452 /* Recording.markdown in Resources */,
4BF14BC32405730900E31D93 /* Assets.xcassets in Resources */,
4BF14BC12405730700E31D93 /* Main.storyboard in Resources */,
4BFC5F212458ACE200E5A3C1 /* ParticipantInformation.markdown in Resources */,
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.
89 changes: 89 additions & 0 deletions ORBIT Camera/Assets.xcassets/City logo.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"images" : [
{
"filename" : "City Black Stroke-1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"filename" : "City Black Stroke.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "City White Stroke.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "City Black [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"filename" : "City Black [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "City White [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "City Black [email protected]",
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"filename" : "City Black [email protected]",
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "City White [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
78 changes: 72 additions & 6 deletions ORBIT Camera/Assets.xcassets/ORBIT logo.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,89 @@
{
"images" : [
{
"filename" : "ORBIT Black Stroke-1.png",
"idiom" : "universal",
"filename" : "ORBIT logo.png",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"filename" : "ORBIT Black Stroke.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "ORBIT White Stroke.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ORBIT Black [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"filename" : "ORBIT Black [email protected]",
"idiom" : "universal",
"filename" : "ORBIT [email protected]",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "ORBIT White [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ORBIT Black [email protected]",
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"filename" : "ORBIT Black [email protected]",
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "ORBIT White [email protected]",
"idiom" : "universal",
"filename" : "ORBIT [email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 6 additions & 5 deletions ORBIT Camera/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@
<navigationItem key="navigationItem" id="mOI-FS-AaM">
<barButtonItem key="rightBarButtonItem" title="Item" image="questionmark.circle" catalog="system" id="Qyt-XI-k0g">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="accessibilityLabel" value="Help"/>
<userDefinedRuntimeAttribute type="string" keyPath="accessibilityHint" value="Brings up a help screen with the how-to steps for the currently selected video type"/>
<userDefinedRuntimeAttribute type="string" keyPath="accessibilityLabel" value="Recording instructions - please read"/>
<userDefinedRuntimeAttribute type="string" keyPath="accessibilityHint" value="Brings up an instructions screen with the how-to steps for recording each type of video"/>
</userDefinedRuntimeAttributes>
<connections>
<segue destination="eDj-Yg-tEO" kind="popoverPresentation" identifier="showHelp" popoverAnchorBarButtonItem="Qyt-XI-k0g" id="C5e-uX-2XX">
Expand Down Expand Up @@ -649,8 +649,8 @@
<navigationItem key="navigationItem" title="Things" id="Zdf-7t-Un8">
<barButtonItem key="rightBarButtonItem" title="Info" image="info.circle" catalog="system" id="tLb-og-RZ7">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="accessibilityLabel" value="App Info"/>
<userDefinedRuntimeAttribute type="string" keyPath="accessibilityHint" value="Find out more about the ORBIT project, and register"/>
<userDefinedRuntimeAttribute type="string" keyPath="accessibilityLabel" value="ORBIT instructions – please read"/>
<userDefinedRuntimeAttribute type="string" keyPath="accessibilityHint" value="Brings up an instructions screen that you will need to read to participate"/>
</userDefinedRuntimeAttributes>
<connections>
<segue destination="hQ4-tG-xkv" kind="popoverPresentation" identifier="showInfo" popoverAnchorBarButtonItem="tLb-og-RZ7" id="ZJu-Cn-xgj">
Expand Down Expand Up @@ -769,6 +769,7 @@
<viewLayoutGuide key="safeArea" id="7eM-8t-mVq"/>
</view>
<connections>
<outlet property="logoView" destination="2aO-i4-d58" id="cn3-05-8tx"/>
<outlet property="scrollView" destination="FfH-Ja-3I0" id="SXc-ea-B1k"/>
<outlet property="sheetButton" destination="ZDt-uB-H9e" id="BY8-Ga-hRv"/>
<outlet property="stackView" destination="W4X-x0-kh1" id="EFQ-UT-eyo"/>
Expand Down Expand Up @@ -801,7 +802,7 @@
<segue reference="VfW-pl-Nv3"/>
</inferredMetricsTieBreakers>
<resources>
<image name="ORBIT logo" width="200" height="200"/>
<image name="ORBIT logo" width="300" height="300"/>
<image name="arrow.up.circle" catalog="system" width="128" height="121"/>
<image name="camera.circle.fill" catalog="system" width="128" height="121"/>
<image name="checkmark.circle" catalog="system" width="128" height="121"/>
Expand Down
32 changes: 16 additions & 16 deletions ORBIT Camera/DetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ class DetailViewController: UIViewController {
/// The camera object that encapsulates capture new video functionality
private let camera = Camera()

/// The timer to limit recording length
private var recordTimeOut: Timer? = nil

/// Implementation detail: need to be able to differentiate whether scrolling is happening due to direct manipulation or actioned animation
private var isManuallyScrolling = false

Expand Down Expand Up @@ -384,13 +387,13 @@ class DetailViewController: UIViewController {
self.pageIndex -= 1
}

detailHeaderElement.accessibilityLabel = "Video review detail"
detailHeaderElement.accessibilityHint = "The following relates to the selected video"
detailHeaderElement.accessibilityLabel = "Details of your selected video"
detailHeaderElement.accessibilityHint = "The following relates to the selected video. It is currently being shown on the screen."
detailHeaderElement.accessibilityTraits = super.accessibilityTraits.union(.header)

recordedElement.accessibilityLabel = "" // Set in configurePage

rerecordElement.accessibilityLabel = "Re-record video" // Set in configurePage
rerecordElement.accessibilityLabel = "Re-record selected video" // Set in configurePage
rerecordElement.accessibilityHint = "If you wish to re-record, activate to bring up the camera controls"
rerecordElement.accessibilityTraits = super.accessibilityTraits.union(.button)

Expand All @@ -400,7 +403,7 @@ class DetailViewController: UIViewController {

publishedElement.accessibilityLabel = "" // Set in configurePage

deleteElement.accessibilityLabel = "Delete video"
deleteElement.accessibilityLabel = "Delete selected video"
deleteElement.accessibilityHint = "Removes this video from the thing's collection"
deleteElement.accessibilityTraits = super.accessibilityTraits.union(.button)

Expand Down Expand Up @@ -633,6 +636,15 @@ class DetailViewController: UIViewController {
navigationItem.hidesBackButton = true
accessibilityElements = [cameraRecordElement]
cameraRecordElement.accessibilityFrame = UIAccessibility.convertToScreenCoordinates(view.bounds, in: view)

// Start the time-out
recordTimeOut = Timer.scheduledTimer(withTimeInterval: Settings.recordTimeOutSecs, repeats: false, block: { [weak self] (timer) in
guard let self = self else { return }
if case .active = self.recordButton.recordingState {
self.recordButton.toggleRecord() // This is a bit shonky, chance of a simultaneous press.
self.recordButtonAction(sender: self.recordButton)
}
})
case .idle:
camera.recordStop()

Expand Down Expand Up @@ -753,18 +765,6 @@ class DetailViewController: UIViewController {
layoutAccessibilityElements()
}

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
switch segue.identifier {
case "showHelp":
guard let helpViewController = segue.destination as? HelpViewController
else { return }

helpViewController.kind = pageKind
default:
break
}
}

// TODO: Refactor away, pager category should be protocol stringconvertible or somesuch.
func videoKind(description: String) -> Video.Kind {
switch description {
Expand Down
Loading