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

chore(demo): new example improvements #1100

Merged
merged 2 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions demo/backend/navigation/behaviors/actions/new/index.xml.njk
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@ hv_button_behavior: "back"
{% endblock %}

{% block content %}
{{ description('Tapping the button below will request an XML screen and show it in a new modal.') }}
{{ description('Tapping the button below will open a screen in a modal.') }}

{% call button('New') -%}
<behavior action="new" href="/hyperview/public/navigation/behaviors/actions/modal/index.xml" />
<behavior action="new" href="/hyperview/public/navigation/behaviors/actions/new/modal.xml" />
{%- endcall %}

{% call button('New with indicator') -%}
<behavior action="new" delay="1000" href="/hyperview/public/navigation/behaviors/actions/modal/index.xml" show-during-load="loading-screen" />
<behavior action="new" href="/hyperview/public/navigation/behaviors/actions/new/modal.xml" show-during-load="loading-screen" />
{%- endcall %}

{{ description('Tapping the button below will open a modal with query params from the form.') }}
<form>
{% call button('New with params') -%}
<behavior action="new" delay="1000" href="/hyperview/public/navigation/behaviors/actions/modal/index.xml" show-during-load="loading-screen" />
<behavior action="new" href="/hyperview/public/navigation/behaviors/actions/new/modal.xml" show-during-load="loading-screen" />
{%- endcall %}
<text-field style="input" name="param1" value="value1"/>
</form>
Expand Down
11 changes: 11 additions & 0 deletions demo/backend/navigation/behaviors/actions/new/modal.xml.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
permalink: "/navigation/behaviors/actions/new/modal.xml"
hv_title: "Modal Screen"
hv_button_behavior: "close"
---
{% extends 'templates/scrollview.xml.njk' %}
{% from 'macros/description/index.xml.njk' import description %}

{% block content %}
{{ description('This screen was dynamically opened as a modal.') }}
{% endblock %}