Adding "back" button to Weather app (matching Agenda, Health, etc)? #5441
Replies: 1 comment
-
Posted at 2022-12-03 by @halemmerich I think the back button and stuff like Maybe we need some kind of UX guideline in the docs regarding the use of the back button? Or a default implementation going back to clock or launcher (configurable?). Regarding the weather app, I think the use of the clock UI is a workaround for not having to copy over the clock UI implementation. Since the only thing that UI actually does is setting a button for going back to launcher, replacing that for weather with a custom UI would probably be ok. Posted at 2022-12-03 by digitalcircuit That makes sense - in rough Android parlance, the Bangle back button mimics the Android Back button (even down to the inconsistency with which Android apps handle "back" events), and I feel like it'd be reasonable to have a default implementation that's either a boolean to enable or made opt-out, similar to how the widget bar can be shown/hidden. However, I'm not sure how practical this would be in reality. And noted on the weather app! Whenever I have the time/energy, I'll look into making this change. Posted at 2022-12-05 by @gfwilliams
Yes, absolutely!
I think it would still work fine. I just tested:
And I think that's good. I'm not really sure I understand the reasoning behind making the weather app behave differently to every other app (going to launcher instead of the clock) but my preference would be to make 'back' go back to the clock.
Yes, I guess this might clear things up? I'm just wary of adding to the existing pile of documentation when it seems not that many people read it anyway :)
I think we'd already discussed this in a PR? Afaik nothing stops someone from making a one-line custom boot code app that does Posted at 2022-12-05 by @halemmerich
The idea was less changing the way the app behaves and more removing the need to manually remove
Yeah, I think we did :) Actually Posted at 2022-12-06 by rigrig
Probably because I just copied it from some clock code without thinking too much about it ;-)
Yes, I agree. Posted at 2022-12-06 by @gfwilliams
Maybe although I think the current solution of a Whenever stuff like Posted at 2022-12-06 by rigrig Right, I can see why we want to avoid changing Bangle.setUI. But as far as I can tell on Bangle.js 1:
opens the launcher (instead of the clock) when you press the middle button. And
does nothing for button presses. So we end up needing something like this:
Bangle.js 2 Maybe we could add similar code to the Bangle.js 1
But I suppose that would lead to the same problem of it not working in older firmware... (On the other hand: it doesn't work now either, so apps that already assign their own BTN2 listeners should be fine?) Posted at 2022-12-06 by @gfwilliams That's odd. On Bangle.js 2 this works great with button and touch as you say:
Yes, I think that's the best bet. We need to fix that or Not sure what you think, but since long-pressing BTN3 goes back, it might be the best bet to use that instead of BTN2? Not sure... Posted at 2022-12-06 by rigrig
I don't think it's quite that bad: touching the left-hand side of the screen works fine, and most apps do use the buttons anyway. But for those that don't, it would be nice if this worked. BTN2 seemed natural, but now you mention BTN3, that would make sense Posted at 2022-12-07 by @gfwilliams Ok - just done! Posted at 2022-12-07 by rigrig Thanks! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-12-03 by digitalcircuit
I've noticed some apps on the Bangle.js 2 feature a back button widget in the top-left of the touchscreen (e.g. Agenda, Settings), and other apps do not (e.g. Weather).
From reading a recent commit to the Health app, it seems like supporting the back button widget is the intended way forward (instead of having to install
widclose
or such). When using the Quick Launcher to access apps from the clock screen with swipes, having the back button is convenient to avoid needing to press the physical button. And this saves on wear to the watch physical button, which I'm a bit concerned about after hearing that others' buttons have become dislodged.However, the Weather app already calls for the
clock
UI, which sounds like it'd conflict with usingBangle.setUI({mode : "custom", back : function() … })
to provide a back button.As someone new to Bangle.js/Espruino, what would be the proper way to solve this?
Beta Was this translation helpful? Give feedback.
All reactions