Skip to content

Commit 093ffb2

Browse files
fix(demo): navigation/modal examples issues (#1054)
- remove delays - fix language for modal and push screens (globally) - adding example modal and push screens to resolve infinite loop and top button type https://github.com/user-attachments/assets/3c6f5404-7683-4e51-9f8d-bfdfce3f3007 [Asana](https://app.asana.com/0/1205761271270033/1209182447962504/f)
1 parent c494d7c commit 093ffb2

File tree

8 files changed

+49
-7
lines changed

8 files changed

+49
-7
lines changed

Diff for: demo/backend/navigation/behaviors/actions/modal/index.xml.njk

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
permalink: "/navigation/behaviors/actions/modal/index.xml"
33
tags: "Navigation/Behaviors/Actions"
44
hv_title: "Modal"
5-
hv_button_behavior: "back"
5+
hv_button_behavior: "close"
6+
hv_open_modal: "true"
67
---
78
{% extends 'templates/scrollview.xml.njk' %}
89
{% from 'macros/description/index.xml.njk' import description %}
@@ -12,10 +13,10 @@ hv_button_behavior: "back"
1213
{{ description('Open a new modal screen') }}
1314

1415
{% call button('Open another modal') -%}
15-
<behavior action="new" delay="1000" href="/hyperview/public/navigation/behaviors/actions/modal/index.xml" show-during-load="loading-screen" />
16+
<behavior action="new" href="/hyperview/public/navigation/behaviors/actions/modal/modal-1.xml" show-during-load="loading-screen" />
1617
{%- endcall %}
1718

1819
{% call button('Push on the stack') -%}
19-
<behavior action="push" href="/hyperview/public/navigation/behaviors/actions/modal/index.xml" />
20+
<behavior action="push" href="/hyperview/public/navigation/behaviors/actions/modal/push-1.xml" />
2021
{%- endcall %}
2122
{% endblock %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
permalink: "/navigation/behaviors/actions/modal/modal-1.xml"
3+
hv_title: "Modal Screen 1"
4+
hv_button_behavior: "close"
5+
---
6+
{% from 'macros/description/index.xml.njk' import description %}
7+
{% extends 'templates/scrollview.xml.njk' %}
8+
9+
{% block content %}
10+
{{ description('This screen was dynamically opened as a modal.') }}
11+
{% endblock %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
permalink: "/navigation/behaviors/actions/modal/push-1.xml"
3+
hv_title: "Push Screen 1"
4+
hv_button_behavior: "back"
5+
---
6+
{% from 'macros/button/index.xml.njk' import button %}
7+
{% from 'macros/description/index.xml.njk' import description %}
8+
{% extends 'templates/scrollview.xml.njk' %}
9+
10+
{% block content %}
11+
{{ description('This screen was dynamically pushed on the stack.') }}
12+
{{ description('Pushing the button below will push another screen onto the stack.') }}
13+
{% call button('Push on stack') -%}
14+
<behavior
15+
action="push"
16+
href="/hyperview/public/navigation/behaviors/actions/modal/push-2.xml"
17+
/>
18+
{%- endcall %}
19+
{% endblock %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
permalink: "/navigation/behaviors/actions/modal/push-2.xml"
3+
hv_title: "Push Screen 2"
4+
hv_button_behavior: "back"
5+
---
6+
{% from 'macros/description/index.xml.njk' import description %}
7+
{% extends 'templates/scrollview.xml.njk' %}
8+
9+
{% block content %}
10+
{{ description('This screen was dynamically pushed on the stack.') }}
11+
{% endblock %}

Diff for: demo/backend/navigation/navigator/stack/modal-1.xml.njk

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ hv_button_behavior: "close"
88
{% extends 'templates/scrollview.xml.njk' %}
99

1010
{% block content %}
11-
{{ description('This screen was dynamically opened on the stack.') }}
11+
{{ description('This screen was dynamically opened as a modal.') }}
1212
{{ description('Pushing the button below will push another screen onto the stack.') }}
1313
{% call button('Push on stack') -%}
1414
<behavior

Diff for: demo/backend/navigation/navigator/stack/modal-2.xml.njk

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ hv_button_behavior: "back"
88
{% extends 'templates/scrollview.xml.njk' %}
99

1010
{% block content %}
11-
{{ description('This screen was dynamically opened on the stack.') }}
11+
{{ description('This screen was dynamically opened as a modal.') }}
1212
{% call button('Back to beginning') -%}
1313
<behavior
1414
action="close"

Diff for: demo/backend/navigation/navigator/stack/push-1.xml.njk

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ hv_button_behavior: "back"
88
{% extends 'templates/scrollview.xml.njk' %}
99

1010
{% block content %}
11-
{{ description('This screen was dynamically opened on the stack.') }}
11+
{{ description('This screen was dynamically pushed on the stack.') }}
1212
{{ description('Pushing the button below will push another screen onto the stack.') }}
1313
{% call button('Push on stack') -%}
1414
<behavior

Diff for: demo/backend/navigation/navigator/stack/push-2.xml.njk

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ hv_button_behavior: "back"
88
{% extends 'templates/scrollview.xml.njk' %}
99

1010
{% block content %}
11-
{{ description('This screen was dynamically pushed to the stack.') }}
11+
{{ description('This screen was dynamically pushed on the stack.') }}
1212
{% call button('Back to beginning') -%}
1313
<behavior
1414
action="navigate"

0 commit comments

Comments
 (0)