-
-
Notifications
You must be signed in to change notification settings - Fork 60
Add BackButton #692
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
Add BackButton #692
Conversation
* Use Gtk.Image, deprecate style class, demo * Update BackButton.vala
|
It now won't hide when there is no preceding page since that caused problems with it not being mapped again because it's not visible so that it won't recheck whether anything changed. It could still be implemented if needed but since there's usually always exactly one page that's the first and we know which one it is (Home on appcenter, category on settings, welcome on videos) I don't think it's worth the effort. |
|
I think @tintou has some thoughts about adding Adw as a dep here in Granite |
danirabbit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's slightly less magical, but I think it's still worth it to merge this without the adw dep. NavigationView adds a navigation.pop action we can use to at least make the button function and then all that needs to be done in-app is to set the label.
Co-authored-by: Danielle Foré <danielle@elementary.io>
|
@danirabbit feel free to take over and merge, I'm currently really limited on time :/ |
|
@wpkelso does this sound good to you? |
|
I'm fine with this. However, it does feel a little weird to have a technically half-implemented widget sitting around in the library. I think this would ideally be joined by a first-party Navigation View, but I don't know if we have the bandwidth to build and maintain that right now. |
|
It's slightly more implemented than the style class was though 😅 |
Agreed; I put it out more as a consideration for the future, rather than a blocker. |
Introduce a BackButton that automatically lables itself correctly with the preceding page and navigates back when clicked. Useful for elementary/settings#300 as well as in videos, appcenter, etc.
This will introduce an Adw dependency with minimum required version 1.4 which will break building granite on OS 7