circles-myxogastria
circles-myxogastria copied to clipboard
Return button doesn't lead you to dashboard
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Login in circles garden
- In a new tab of the browser, go to https://circles.garden/settings
- Click on the icon to go back (an arrow to the left, which is on the top-left corner of the view)
- See how you go to a blank page
Expected behavior I expect going to my dashboard
Behaviour is set here: https://github.com/CirclesUBI/circles-myxogastria/blob/f9459b4c684d8cb0149deeb0709782b428471dda/src/components/ButtonBack.js#L12 It uses browser history through a react hook called useHistory. So it functions as a back button, which is natural to a back button, one could argue.
This only happens if you visit another page in your browser before a view with a back button. Either by clicking on a link (e.g. opening the link in this issue in the same tab) or by copying the url into your browser manually in a tab with browser history. If you navigate within the app it will never fail. Also if you open this link in a new tab by right clicking open in new tab, it does go to dashboard (when there is no browser history).
Personally I think this is a corner case an also if i paste this link into my browser and press back, it isn't that weird that it goes back in my browser history. It could even be counter-intuitive if it redirected me to dashboard when i go "back" if i havent come from there. I suggest we close this.
I looked into useHistory and how it is used and I don't see an easy way to adjust this I suggest we close this considering the narrow gain of changing the current behavior. What do you think @llunaCreixent ?
Well... my intuition is that it shouldn't go to "back history" but to the app view that is behind (which is dashboard). This would be something that product (@triaslucia ) has to decide. But from my experience with other apps, my expected behavior is that I find the base view (dashboard) behind the specific view (profile, or send, or trust... or whatever). So I like the button doing "behind" and not "back in history". But again I think this is a product decision ❤️ . @juanenrisley what do you think ? :)
In my humble opinion, it is inconsistent to have a "go back" button on your app that goes to a blank page or even a page that is not your apps (if you have open a different page already and paste the url of the app and then go back, you will go to the first page, outside myxo). Our "go back" button right now is the same as the go back arrow of the browser, so does not make a lot of sense.
yes, I experienced this as well some days ago, an was super confusing and stressful. I also agree it should lead to "Landing page AKA. Dashboard"