app-center icon indicating copy to clipboard operation
app-center copied to clipboard

Can't return from app page via sidebar

Open madsrh opened this issue 2 years ago β€’ 5 comments

When you're on an app page within Explore, you should be able to click "Explore" in the sidebar to return to the previous page (like the back button < does).

Similarly if you open the app page from "My apps" you can't click "My apps" in the sidebar to return.

I've made a beautiful illustration below: image

madsrh avatar Sep 21 '22 22:09 madsrh

Hmmmm the back πŸ”™ button in the appbar is not enough?

Feichtmeier avatar Sep 22 '22 05:09 Feichtmeier

the back πŸ”™ button in the appbar is not enough?

IDK πŸ€·β€β™‚οΈ IMO there's no reason to "disable" it. It seems a bit counterintuitive that you can't click it, but let's hear what others think ☺️

madsrh avatar Sep 22 '22 06:09 madsrh

Nono it is not disabled : D I just did not think about this before. Needs a change in yaruwidgets, but should be no problem. Maybe you have learned to navigate back like this, while my brain learned to focus on back-buttons. At least I should add this feature in yaruwidgets with an onTap callback which can be used or not

Feichtmeier avatar Sep 22 '22 06:09 Feichtmeier

Makes sense - this kind of shortcuts are common in mobile apps. Even though I wouldn't have realized to try to click the sidebar item either. :)

jpnurmi avatar Sep 22 '22 07:09 jpnurmi

Imo, this is a good idea @madsrh :+1: But honestly I never through about click again on the side bar to go back.

Jupi007 avatar Sep 22 '22 08:09 Jupi007

I actually just tried to go back to Explorepage by clicking on the icon :) I think it's quite a common pattern.

anasereijo avatar Dec 06 '22 17:12 anasereijo

@d-loose could you check if you got a solution for this one? JP said we might need some sort of controller pattern forwarded top to bottom in the tree here

Feichtmeier avatar Jan 06 '23 19:01 Feichtmeier

I'll look into it :)

d-loose avatar Jan 06 '23 20:01 d-loose

I've played around a bit - some thoughts:

  • The cleanest solution would probably be to switch to a completely declarative navigation and set a proper state in YaruNavigationPage's onSelected. Currently the only parts that use imperative navigation are the App/Package/Snap pages, but it still looks like a decent amount of refactoring.
  • Another solution would be to pass navigator keys to all pages of the YaruNavigationPage and simply call popUntil((route) => route.isFirst) on the respective navigator in onSelected. This could probably also be done directly in the yaru widgets instead.

d-loose avatar Jan 09 '23 13:01 d-loose

@d-loose thanks for investigating, if you don't have a strong veto I would go for the second idea :)

Feichtmeier avatar Jan 09 '23 13:01 Feichtmeier

Thanks πŸ‘

madsrh avatar Jan 09 '23 16:01 madsrh

Thank you @d-loose !

Edit: now the designers and use their weird way to navigate back :laughing: (just kidding)

Feichtmeier avatar Jan 09 '23 16:01 Feichtmeier