billthefarmer / diary

Android personal diary - forked from http://git.savannah.gnu.org/cgit/diary.git
https://billthefarmer.github.io/diary
GNU General Public License v3.0
276 stars 58 forks source link

Template only applied by menu item "today" #143

Closed just-Nob closed 4 years ago

just-Nob commented 4 years ago

The template seems to be only applied by using the menu item "today". I expected it to be applied every time I edit an empty page (=no date entry).

billthefarmer commented 4 years ago

This is deliberate. Otherwise it would be easy to fill the diary with empty templates by swiping back and forth or otherwise going to empty dates.

just-Nob commented 4 years ago

You're absolutely right, I hadn't that in mind.

Anyway, my idea was more to fill an empty page not before the moment it's going to be edited.

One proposal describe the possible behaviour in a concrete use case:

  1. The user taps the floating "edit" button.
  2. [Alternative to 1:] The user selects the "today" menu item.
  3. Before opening the edit screen, the app checks whether the desired page to be edited is empty.
  4. If so (and there's a defined template), a requester comes up to ask the user: "This entry/page is empty. Do you want to use the template? [yes|no] "
  5. Dependent on the user's choice, the page will be prepopulated with the template's content (or won't).
just-Nob commented 4 years ago

BTW, the way it's currently implemented has two massive disadvantages:

  1. I'm not able to jump directly to today's entry without filling out with the template's content (if usage of templates is activated and a template is defined, as well as the today's entry is empty).

  2. The usage of the template is not possible for any other entry as for that of the current day (i.e. "today") - excepted by a manual copy/paste action of the template's content. But imagine you want to write down the day when it's half past midnight, for example... - I think that other situations may also be possible.

billthefarmer commented 4 years ago

OK, I have added a menu item to copy the template to the current entry if a template is set and if the entry is empty. That is in the latest version.

just-Nob commented 4 years ago

Thanks, I'll check it as soon as the new version is available in the F-Droid repo.

Toneymoon commented 4 years ago

Looking forward to test a new behavior of the template in new version from F-Droid repository.

just-Nob commented 4 years ago

I've tested it, the new menu item works as expected without any issues.

BTW, I sometimes find it very strange that diary copies the template immediately if the current date comes up. In my opinion, this is still an adverse behaviour, because every day I'm starting the diary app, the template is copied into the current day's content.

On the one hand, this means that it isn't possible to open diary for just reading older entries without making any entry for the current day - if the current day was empty before starting diary and I don't want to make any entry for the current day, the template is nevertheless copied into the day's page! This is really counterproductive.

Why not to insert the template at the point in time when it's really needed: if an empty entry is going to be edited!?

billthefarmer commented 4 years ago

Ok, that's a better idea, it will be in the next version. It also makes the menu item redundant, I think.

just-Nob commented 4 years ago

Looking forward fit the next version! :) Yes, I also think it's redundant.