Save directory of last imported activity
misev opened this issue · 8 comments
File -> Import activity... does not save the last directory from which an activity was imported. Each time the dialog is reset to selecting from a list of recent files, which is useless. On Linux at least all fit files from the watch get downloaded to a single large directory, so I have to navigate to this directory for every activity over and over again.
I suspect on Windows each download creates a new directory, seeing also that "Import from directory..." has a dedicated shortcut. I'd similarly add a shortcut for "Import activity...", this is what I did for Ctrl+Shift+I:
diff --git a/rkt/toplevel.rkt b/rkt/toplevel.rkt
index 2594555..77bb653 100644
--- a/rkt/toplevel.rkt
+++ b/rkt/toplevel.rkt
@@ -172,6 +172,8 @@
(new menu-item%
[parent file-menu] [label "Import &activity..."]
+ [shortcut #\I]
+ [shortcut-prefix '(ctl shift)]
[callback (lambda (m e) (send toplevel on-import-activity))])
Finally, I'd propose a small feature for the roadmap that would reduce activity import friction to almost zero: "Import most recent files". It would work as follows:
- Determine last directory from which an activity was imported (does nothing and shows a warning if there's no such dir saved)
- Scans directory for fit files which have not yet been imported into ActivityLog2
- Automatically imports matching files
I am confused -- "Import from directory..." works pretty much as you describe with the additional step that it shows the directory selector, but it saves the last import directory, so you can just click OK. It will scan the directory, skip files which were already imported and import new files. Is this not working as expected for you?
"Import activity..." uses the Racket get-file
function which displays the system dialog box -- on Windows, this will remember the last open directory, but this may not be the case on Linux -- I will look into saving and restoring the last import directory explicitly.
Oh I didn't realize this is how "Import from directory..." works! Intuitively I thought it will try to import all files from the directory and overwrite previously imported ones. I guess some sort of manual or contextual help (tooltip on hover or so) would significantly improve getting used to ActivityLog2.
In this case I think it's not really important to save the last used directory for "Import activity...". Linux doesn't seem to remember it on its own, but I don't think it's worth implementing workarounds when "Import from directory..." works like this.
The Racket GUI library does not support adding tooltips to menu items, so the only option that I see is to rename "import from directory..." to a better name. Other options is to offer some tips at startup for new users and provide some tutorials, but these require considerably more effort...
I am thinking of renaming "Import Activity..." to "Import a Single Activity ..." and "Import from Directory..." to "Import New Activities...".
I would like to avoid the word "Sync", as I always find it confusing -- to me it would mean that the activities are updated to and from ActivityLog2 which is not the case...
I am thinking of renaming "Import Activity..." to "Import a Single Activity ..." and "Import from Directory..." to "Import New Activities...".
This sounds clearer to me.
I'd agree that "Sync" is not very suitable.
Does the GUI library support tooltips on other widgets, e.g. the header on the Activities table? There are many shortcuts that may be difficult to recognize for a new user, I could try to add some info on them.
You mean this header?
You can add tooltips to pretty much any widgets (e.g. text boxes and labels), but not to individual parts of the widget (e.g. you cannot add a tooltip for the activity line on which the mouse hovers). Although for the latter, I would need to look into more detail to see if something can be built...
Adding tooltips is relatively simple, but it has to be done in a lot of places (everywhere you want to tooltip to show up). What tooltip messages are you thinking about? I could add one of them as an example, and point you towards how to add the rest, if you want to.
Unfortunately tooltips cannot be attached to the column headers in list views -- the current mechanism only allows attaching a tooltip to a widget not to its sub-parts. You could attach a tooltip to the entire list view, but that is not useful...
There might be a way to add this functionality on top of the list view, but this would be a complex task unfortunately. Still, I'll keep this in mind to investigate when I have some time...
I have updated the wording for the option to import new activities, and the import single activity will now remember the last directory where it imported from.
I will close this issue, as the tooltips are a separate issue, and the Racket GUI library does not support adding tooltips on the columns of a listview.