Skip to content

Commit

Permalink
chore(demo): new example improvements (#1100)
Browse files Browse the repository at this point in the history
Resolving issues in Navigation > Behaviors > New

- Removed unneeded delays in behaviors
- improved target of modal example
- improved description

| Before | After |
| -- | -- |
|
![before](https://github.com/user-attachments/assets/af7c4ebe-2360-442f-a914-c30d50ee6a64)
|
![after](https://github.com/user-attachments/assets/4e6953c4-c14a-4075-b7ec-e9c68ca92896)
|

[Asana](https://app.asana.com/0/1204008699308084/1209182447962507)
  • Loading branch information
hgray-instawork authored Feb 26, 2025
1 parent e631a61 commit cbd2ac3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
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 %}

0 comments on commit cbd2ac3

Please sign in to comment.