XRPL-Labs/Xaman-App

[Improvement] Remember URL when switching nodes/accounts in xApp

Opened this issue · 2 comments

When an user switches node or account within an xApp, the xApp reloads. But it doesn't remember the page you were on while switching. E.g. When I'm in the xApp for ordering cards and I'm in the process of selecting my cards and the amount I want to pre pay, but then think of paying with another account, I want to switch to that account. But then the xApp reloads and I have to re-navigate through all the steps.

Possible solution
Make it possible to remember the page the user was on when switching accounts or nodes.

Hurdles
In my example, I have to rebuild the xApp to handle this. So do all the other developers I think. But from a user perspective I think it's a good improvement.

Thanks Kevin, I think a good approach would be to show a message before reloading the xApp and give user ability to hide this message for feature use. like a heads up, we don't know how how xApps will handle reload to the same page, so I think it's better to reload the xApp it's initial URL, with need context.

@KevinKoobs Like @N3TC4T mentioned: we don't know if the xApp can even handle direct loads on other URLs. They could as well be SPAs even without URLs.

I think this is the responsibility of the xApp. We always load the default which will always work, and if the xApp wants to offer a better experience (which they should) they can just remember last-state in localStorage or user store & rebuild from there if user's xApp is reloaded.