Skip to content

Commit 1f38d98

Browse files
committed
docs: View Origin demo + video flow
1 parent 7465d71 commit 1f38d98

File tree

9 files changed

+418
-115
lines changed

9 files changed

+418
-115
lines changed
Binary file not shown.
4.54 MB
Binary file not shown.

content/dev-reference.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ This page serves as a reference for the available markdown options in the docs.
3030
<img src="./assets/diagrams/StackLayout.drawio.svg"/>
3131
</DeviceFrame>
3232

33+
## Videos
34+
35+
### View Origin Demo
36+
37+
<DeviceFrame type="ios">
38+
<video style="max-width: 400px;" muted="true" disablepictureinpicture="true" autoplay="true" loop="true" src="./assets/videos/animation_origin_ios.mp4"/>
39+
</DeviceFrame>
40+
<DeviceFrame type="android">
41+
<video style="max-width: 400px;" muted="true" disablepictureinpicture="true" autoplay="true" loop="true" src="./assets/videos/animation_origin_android.mp4"/>
42+
</DeviceFrame>
43+
3344
## Frontmatter
3445

3546
The top of the markdown file contains a section surrounded by `---` this part is called the frontmatter, and it is used to set a few things on a page. For example:

examples/flows/animation_origin.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Input file used by Maestro screenshots.yaml
2+
// to generate screenshots for the examples
3+
4+
output.origins = [
5+
'0 / 0',
6+
'0.5 / 0',
7+
'1 / 0',
8+
9+
'0 / 0.5',
10+
'0.5 / 0.5',
11+
'1 / 0.5',
12+
13+
'0 / 1',
14+
'0.5 / 1',
15+
'1 / 1',
16+
]

examples/flows/animation_origin.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
appId: org.nativescript.examplesApp
2+
---
3+
- launchApp:
4+
permissions:
5+
android.permission.DUMP: allow
6+
- waitForAnimationToEnd
7+
- openLink: ns-examples://enableDemoMode
8+
- runScript: animation_origin.js
9+
- runFlow:
10+
when:
11+
platform: android
12+
commands:
13+
- evalScript: ${output.platform = 'android'}
14+
- runFlow:
15+
when:
16+
platform: ios
17+
commands:
18+
- evalScript: ${output.platform = 'ios'}
19+
20+
- openLink: ns-examples://navigate/ViewOrigin
21+
- startRecording: ../content/assets/videos/animation_origin_${output.platform}
22+
- repeat:
23+
while:
24+
true: ${(output.current = output.origins.shift()) !== undefined}
25+
commands:
26+
- tapOn:
27+
text: ${output.current}
28+
retryTapIfNoChange: false
29+
- tapOn:
30+
text: 'Play'
31+
retryTapIfNoChange: false
32+
- waitForAnimationToEnd:
33+
timeout: 5000
34+
- tapOn: '1 / 1' # just to delay the recording stop
35+
- stopRecording
36+
- openLink: ns-examples://disableDemoMode

0 commit comments

Comments
 (0)