Skip to content

[Issue]: ReplacePage Navigation Command from Action Panel Clears Navigation Stack (No Back Button) #72

@briankalwat

Description

@briankalwat

Describe the Issue in Detail

According to the documentation, the ReplacePage navigation command should only replace the current page with the new page referenced in the command parameter, leaving the previous navigation stack in-tact.

In my experience (and I could definitely be doing something wrong!), using the ReplacePage command in the context of an action panel functions the same as ShowPage – clearing the entire navigation stack and giving no back button.

Can reproduce in

  • Orange App
  • Blue App

Steps to Reproduce

  1. Create a new mobile page with a CMS block and insert the XAML listed below, but update the targetPageGuid lava variable to be any valid page guid within the app you're testing in.
  2. Add a button to the home page of your app, linking you to the new page you created in step 1 using a PushPage command (this will create a navigation stack w/back button).
  3. Click the "Replace Page Test" button on your newly created page to open the action panel, then click both the ShowPage and ReplacePage options.
  4. Observe that both options remove the back button, preventing you from going back to the previous page.

Expected Behavior

The ReplacePage navigation command should replace the current page with the page referenced in the CommandParameter attribute, leaving the navigation stack in-tact and retaining a back button.

Actual Behavior

The ReplacePage navigation command appears to function exactly like the ShowPage command - clearing out the navigation stack and showing the new page (at least within the context of an action panel).

Screenshots or Videos

Reproduction XAML

{% assign targetPageGuid = '94071cfe-2df5-42d0-a267-1046f08ae6a8' %}

<Button Text="Replace Page Test" Command="{Binding ShowActionPanel}" StyleClass="btn,btn-primary">
    <Button.CommandParameter>
        <Rock:ShowActionPanelParameters 
            Title="Choose a Command"
            CancelTitle="Dismiss">

            <Rock:ActionPanelButton
                Title="Replace Page"
                Command="{Binding ReplacePage}"
                CommandParameter="{{ targetPageGuid }}" />

            <Rock:ActionPanelButton
                Title="Show Page"
                Command="{Binding ShowPage}"
                CommandParameter="{{ targetPageGuid }}" />

        </Rock:ShowActionPanelParameters>
    </Button.CommandParameter>
</Button>

Mobile Shell Version

6.0.0.0

Last Known Working Version

No response

iOS Device Type(s) and iOS Version(s)

iPhone 16 Pro, iOS 18.5 (22F76)

Android Device Type(s) and Android Version(s)

Google Pixel 7, Android 15

Metadata

Metadata

Assignees

Labels

status: researchingReported issue is understood, but additional developmental research required.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions