Skip to content
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

dynamically update title and visible durations for running records #752

Merged
merged 4 commits into from
May 5, 2019

Conversation

kevinpapst
Copy link
Member

@kevinpapst kevinpapst commented May 3, 2019

Description

Added a javascript which will update all durations for running records:

  • on the browser title
  • on the "active entries" dropdown

Fixes #420
Fixes #660

TODO

  • update timesheet tables
  • limit title to the first 3 entries

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes
  • I agree that this code is used in Kimai and will be published under the MIT license

@infeeeee
Copy link
Contributor

infeeeee commented May 3, 2019

Very nice, thank you. My notes on this:

  • One digit mins and hours show up without an additional 0. On 'my times' 2 hours and 2 minutes looks like this: 02:02. On the title it looks like this: 2:2. This is the same for the active records, however there the 0s disappear when the time shows up on the title.

  • I don't really like the delay when the timer shows up, but I can live with it, I understand the reason(to show the name 'kimai' in the titlebar?) , it's just strange, maybe because on kimai1 the timer started immediately on the title. Maybe replace the 'time tracking' text with the clock, so it will look like this:
    image

  • Small bug: If I change the start time of a running timer, the times update on My times, however on the active recordings and title still shows the old timer started from the original start time. This is also true if I delete an active recording from 'my time'.

Edit: I just read that this is on the todo: "update timesheet tables" so removed from my notes

added leading zero to duration units
added duration updates on timesheet tables
show a max amount of 3 records in title
@kevinpapst
Copy link
Member Author

Hey, thanks for the quick and detailed feedback - awesome!

No, I don't care about "Kimai in the title" at the beginning.
I just registered a script which runs every 10 seconds, thats where the delay came from.

I knew about the missing zero and pushed the following changes, if you want to do a re-test:

  • update all durations and title as soon as the page is loaded
  • added leading zero to duration units
  • added duration updates on timesheet tables
  • show a max amount of 3 records in title
  • show only the own durations in title

@kevinpapst kevinpapst changed the title javascript to update duration for running records on the page and title dynamically update title and visible durations for running records May 3, 2019
@infeeeee
Copy link
Contributor

infeeeee commented May 3, 2019

The title and the active records don't update when I modify the start of a running record or delete a running record, because the page doesn't reload like when I stop it. But it's a rare use case.

Everything else is superb!

@kevinpapst
Copy link
Member Author

Ah, forgot about that... I'll have a look.

@kevinpapst
Copy link
Member Author

kevinpapst commented May 3, 2019

Okay, I didn't read properly. This is about the "active entries" dropdown ... hmmmm, the bug was there before, but now its much more visible.
The information in the title is taken from the dropdown, so its not refreshed after updating an entry.

I want to stop entries in the future without reloading the page and therefor this dropdown needs to be rewritten to use the API. But thats a little bit more work and I don't want to mix it with this issue. I will write a new issue for that, that the menu refreshes itself when changing the own timesheet entries.

@kevinpapst kevinpapst merged commit aa113cc into master May 5, 2019
@kevinpapst kevinpapst deleted the show-active-records branch May 5, 2019 01:01
@lock
Copy link

lock bot commented Aug 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@lock lock bot locked and limited conversation to collaborators Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show on the title if there is an active recording Refresh of Duration time
2 participants