ernesst / ActivityTracker

ActivityTracker app for Ubuntu
GNU General Public License v3.0
6 stars 12 forks source link

fix #45 and fix #46 by adding pause option and improve cancel handling #50

Closed Danfro closed 4 months ago

Danfro commented 1 year ago

Only merge after #44 !

This PR based on focal branch does address two issues:

  1. it will add an option to pause recording (#46 )
  2. it will improve cancel/discard track handling (#45 )

I will mark it as draft for now so we can discuss the UI and wait for the focal PR to get merged.

We can not (easily) fully omit bottom edge's "down arrow". So my idea was that the down arrow will become a "start/pause" button. (screenshot 1, 2, 3) Using it for pause/resume actually feels quite convenient in real use.

The "start" header button does the same as pressing the square green "start" button (yes, redundant). The "pause" button will pause the recording and change to "start" to allow resume.

The dialog popping up when pressing the red square "stop" button I changed to hold 4 buttons: a) stop and save recording (as before) b) stop and discard recording (moved here from header down arrow) c) pause (new) d) do nothing, go back (as before) There are two colored buttons in that menu. That somehow seems to make sense. Although I am aware that this violates the OS UI guidelines. But many current dialogs do that too actually. Also we could remove pause from this menu and only have it in the header. But I think handling with the larger buttons is better when you are doing some sports rather than aiming for the small header icon. I would keep both options.

Screenshots 1, 2, 3 start/resume/pause:

grafik

grafik

grafik

Screenshots 4, 5, 6 new menu layout (menu with pause, menu with resume, cancel and discard dialog):

grafik

grafik

grafik

mymike00 commented 1 year ago

Mmh I don't really like all this redundancy... I see most popular apps on android have a big button (like we have) to start and pause the activity, but when it is paused the buttons become two: one to resume and the other to save. I think that would be doable, there's no issue with small button like the top one and we keep the dialog more understandable with less options

Danfro commented 1 year ago

So you suggest to split the red stop button into two?

And somehow either have no button at all in the header (not sure how to trick bottom edge into that) or maybe just show an icon without any functionality? There could be the location icon maybe if we can't fully omit it.

mymike00 commented 1 year ago

Yes, exactly. And the green button wouldn't be split. For the header idk, because if you want to go back before starting the activity the arrow is still needed. Could be hidden or disabled once the tracking starts but yeah, we'd have to look how easy overriding it is

Danfro commented 1 year ago

Hmm. You are right. I entirely missed that option to go back while not having started yet. Ok, true that is a valid action in the header.

Danfro commented 1 year ago

Ok, regarding the header icon, I decided it works best to have:

Danfro commented 1 year ago

The stop button I did split in half and make it resume and stop. This would look like this now (recording state, paused state, dialog):

grafik

grafik

grafik

mymike00 commented 1 year ago

Oh, I was imagining the pause/stop buttons aligned in a row so that they can have roughly the same size as the single button or a little bit less, but this could work too

Danfro commented 1 year ago

I don't think having the buttons narrower that this is a good idea. Some translations will be longer that the English words. Thats why I stacked them on top of each other.

For translations, I am actually not sure if we should make the buttons wider.

Danfro commented 1 year ago

The buttons start/stop/resume actually have no width set. So they would increase in width for longer translations.

Not sure if setting a fixed width would be better. But button does not allow elide for text I think. So it would need to be wide enough for all sensible translations.

Danfro commented 1 year ago

With a fixed width of `units.gu(16) it would look like this. I actually like it. We could also use a ratio here. This is a bit less than 1/3 of the full width.

grafik

grafik

Danfro commented 1 year ago

I swapped the save activity dialog buttons since it feels more natural to have save on the right hand side. Also I did remove the red color on the cancel button since dialogs should only have one colored button and save seems to be the main (desired) action here.

grafik

Danfro commented 1 year ago

So now this should be really ready to go. :innocent: If you agree on setting the button width...

After this is merged (and the other two PR's?), we need to update the .pot file. I would do that in another PR.

mymike00 commented 1 year ago

I would not setting a fixed width for buttons to have good support for all the screen size and eventually for people that have bigger scaling. The rest seems good!

Danfro commented 1 year ago

Actually with the two buttons pause and stop being both visible at the same time, we may need to set a fixed width. Otherwise with translated words being different length, we end up with buttons having a different width. Here for testing with clickable desktop just made Pause longer.

grafik

Danfro commented 1 year ago

As a possible solution, we could maybe:

Danfro commented 10 months ago

I did spend some time using the app while on holiday and had some new ideas how to fix the buttons and encountered a few more (old) issues.

A newly discovered issue is, that the buttons are not horizontally aligned centered. So they can move left or right depending on the text column content. But that can be fixed by using a RowLayout and aligning them center.

Also I found my above suggestion with the vertical split stop button for stop/pause is hard to handle while on the move. How about a "floating" pause button above the bottom row? It only takes up a small part of the map and will disappear when it is paused but only be visible when recording?

I am also suggesting a solution to #53 . Why not extend the bottom bar in height a bit? The copyright note is visible due to the transparency but we still have the nice design.

Please see screenshots below:

grafik

grafik

@mymike00 would those solutions be fine with you to finalize this MR? Then I would push the code as well.

Danfro commented 10 months ago

Ah, and with the Layout we can set a prefered width for the buttons. That ensures a decent minimum width but also allows the button to stretch a bit when a translation is a bit longer.

Danfro commented 4 months ago

Ok, I just pushed the latest code. Screenshots of the buttons below. @mymike00 or @ernesst I would really like to get this finished. Also it would be great to see ActivityTracker in OpenStore for focal.

The start/stop button has 1/3 of the available width as size now. That matches the pause button on my devices. If the translated content gets too long, it will elide...

grafik

grafik

Danfro commented 4 months ago

Closing this PR here. I will include it in the now developed fork under https://github.com/Danfro/ActivityTracker.