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): reload example improvements #1099

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
14 changes: 1 addition & 13 deletions demo/backend/navigation/behaviors/actions/reload/index.xml.njk
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@ hv_button_behavior: "back"

{{ description('Tapping the button below will reload this screen with a new URL') }}
{% call button('Reload different screen') -%}
<behavior action="reload" href="/hyperview/public/navigation/index.xml" show-during-load="loading-screen" />
{%- endcall %}

{{ description('Tapping the button below will reload the root navigation hierarchy with the "Advanced" tab selected') }}
{% call button('Reload hierarchy') -%}
{# close this view #}
<behavior action="back" href="#" />

{# invoke the behavior defined on /backend/index.xml #}
<behavior
action="dispatch-event"
event-name="reload-root-navigation"
/>
<behavior action="reload" href="/hyperview/public/navigation/behaviors/actions/reload/reloaded.xml" show-during-load="loadingElement" />
{%- endcall %}
{% endblock %}
12 changes: 12 additions & 0 deletions demo/backend/navigation/behaviors/actions/reload/reloaded.xml.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
permalink: "/navigation/behaviors/actions/reload/reloaded.xml"
hv_title: "Reload - Updated"
hv_button_behavior: "back"
---
{% extends 'templates/scrollview.xml.njk' %}
{% from 'macros/description/index.xml.njk' import description %}
{% from 'macros/button/index.xml.njk' import button %}

{% block content %}
{{ description('Changed Screen') }}
{% endblock %}