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

XiaoW Add tooltip to new timer and cleanup old timer #1455

Merged

Conversation

wang9hu
Copy link
Contributor

@wang9hu wang9hu commented Oct 26, 2023

Description

This PR cleans up the old timer related code and files, and adds tooltip to buttons on the new timer. Also included goal changes for the timer behavior adjustment, details are in PR#586

Related PRS (if any):

This frontend PR is related to the backend PR#586

Main changes explained:

  • Delete files/codes related to the old timer, including test files
  • Update new timer with some of the latest changes on the old timer
  • Rename NewTimer to Timer
  • Small changes on TimeEntryForm.jsx, remove redundant codes
  • change 'Goal for today' to 'Initial Goal'

How to test:

  1. check into current branch, check into branch PR#586
  2. do npm install and npm run start:local to run this PR locally
  3. log as any user
  4. go to dashboard
  5. verify timer buttons have tooltips when hovering on them
  6. There are more instructions about the timer behavior changes on the PR#586

Note:

Try clear cache and hard refresh if you see a key error from reducer. Let me know if that error persist after hard refresh.

@wang9hu wang9hu marked this pull request as ready for review October 26, 2023 18:59
ChirayuRai
ChirayuRai previously approved these changes Oct 27, 2023
Copy link

@ChirayuRai ChirayuRai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR! I tested on my end, and it looks like the tool tips work as intended. On top of that, I cannot set the initial goal over 5 hours, and the intitial goal persists between reloads/different sessions.

Screen.Recording.2023-10-26.at.7.04.49.PM.mov

Copy link
Contributor

@malikjahanzaib malikjahanzaib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wang9hu, I have tested the PR locally and there seem to be some bugs while using the "Stop" button on the dashboard.

Firstly, the tooltips work fine and are visible when hovered over.

Secondly, when logging time before timer runs out, the next goal is what is remaining from last timer but to be mentioned when trying to stop the timer using the button on the dashboard it seems unresponsive and I could only stop the timer and log the time when the stop button was accessed via the "clock" icon dropdown (top-left).

Thirdly, Logging time after timer runs out, the next goal is what is set as the initial goal but when the Log Time popup appeared and I clicked on "Log Time", the actual Log Sheet didn't appear until again the "clock" icon was clicked. Refer to my recordings for better understanding and let me know when further testing needs to be done.

Thank you for your work.

Test rec:

Tooltips on hover:

26.10.2023_20.08.31_REC.mp4

Logging time before timer runs out, the next goal is what is remaining from last timer:

26.10.2023_20.09.21_REC.mp4

Logging time after timer runs out, the next goal is what is set as the initial goal:

26.10.2023_20.17.27_REC.mp4

@wang9hu
Copy link
Contributor Author

wang9hu commented Oct 27, 2023

@malikjahanzaib Thank you for your review! Nice catch!
The last two bugs are actually caused by one thing, I somehow made the TimeEntryFrom to show up only when the popup is shown. Now it should be fixed

@malikjahanzaib
Copy link
Contributor

malikjahanzaib commented Oct 28, 2023

@malikjahanzaib Thank you for your review! Nice catch! The last two bugs are actually caused by one thing, I somehow made the TimeEntryFrom to show up only when the popup is shown. Now it should be fixed

Hi @wang9hu, works perfectly. Bug Fixed.
Great work. Appreciate your effort :)

Approving!

Test rec(s):

27.10.2023_17.44.31_REC.mp4
27.10.2023_18.29.22_REC.mp4

malikjahanzaib
malikjahanzaib previously approved these changes Oct 28, 2023
This reverts commit 7ee6235.
@palakgosalia
Copy link
Contributor

Hey, I have reviewed and tested the MR. It works as intended. The tooltips are working well and the goals before and after logging the time also work correctly. Great work.

1455.mp4

Copy link

@savio-henrique savio-henrique left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wang9hu , I've tested your PR and everything that you said to test worked fine! When logging time after the timer ends the timer goal is set to the previous initial goal (see video on timestamp 01:46) and when logging before the timer ends the timer goal is set to the remaining time (see video below on timestamp 05:00).

On the video below I was trying to break the clock by stopping and resetting the timer rapidly and it didn't break.

Issues

  • Tooltip not showing on pause button inside the dropdown (see video below on 3:50);
  • Console reporting an error about the Redux reducer keys (I think it is, correct me if I'm wrong) as the screenshot below shows;
  • (Suggestion) I think there should be a tooltip on the clock icon, saying that it opens the timer dropdown. As it is clickable but doesn't show any tooltip;
  • (Suggestion) Also on the tooltips, I think it would be interesting to have a tooltip on the little hourglass saying that it is registering your time or something like that. Just an idea that I had :).

Video and Screenshot

video1817902655.mp4

console


Final thoughts

Overall, great job with this PR! It worked as intended and when the changes are made I'll be reviewing it again! 👍

@KavyaAlla
Copy link
Contributor

Hey @wang9hu,
I checked out the changes you made in frontend PR#1455 and backend PR#586, and it works as intended. All the timer buttons on dashboard have tooltips on them. The timer just behaves just like you described. If you stop it before it finishes, the next timer starts with the time you had left. Also, even if you refresh the page, the timer keeps going from where you left off.

initial.mov
Time.elapsed.and.break.mov

Your did a great job!

Copy link
Contributor

@KurtisIvey KurtisIvey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an improvement over the current one on the dev. I'm no longer able to submit duplicate time entries by hitting submit multiple times.

issues I'm still experiencing are that there's a delay in closing the modal after hitting submit.

Screen.Recording.2023-10-28.at.4.53.31.PM.mov

Also experiencing the same issue about the reducer keys in the console.
pr1455 error in console

Copy link
Contributor

@cvtqx cvtqx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed this PR and these things work:

1.The tooltips look great.
2.When logging time before timer runs out, the next goal is what is remaining from last timer

I had the following issue:

  1. I had trouble submitting a time entry. The page would not respond after I clicked submit button, I then clicked it several times until it responded and received several duplicate time records as a result. See video:
submitting.time.entries.several.times.mov

And I have one question:

After submitting one time entry with time remaining from the total goal I start the timer again to complete the goal. When I click the reset button, the timer is reset to the original goal. Wouldn't it make more sense if it was reset to the time remaining? Because a user has already logged some time so there is no need to reset it to the original goal. Not a big deal, but just some thoughts...

Here is a video of resetting:

tooltips.and.resetting.mov

@wang9hu
Copy link
Contributor Author

wang9hu commented Oct 29, 2023

Thank you all for your prompt reviews!

Console reporting an error about the Redux reducer keys (I think it is, correct me if I'm wrong) as the screenshot below shows;

@savio-henrique That might be cleared with a hard refresh, try that and let me know if the issue is still there. Your other suggestions are also great!

issues I'm still experiencing are that there's a delay in closing the modal after hitting submit.

@KurtisIvey Unfortunately That is how the TimeEntryForm works now, and it takes long time to submit. I personally believe that also needs a complete overhaul, but I think it is beyond the purpose of this new timer implementation. I will take that as my next task after this. And the reducer key issue please try hard refresh, let me know if that it persists.

I had trouble submitting a time entry. The page would not respond after I clicked submit button, I then clicked it several times until it responded and received several duplicate time records as a result. See video:

@cvtqx I made some changes to the TimeEntryForm so that now user can not spam the button, and the button will show 'Submitting' as a little improvement of UX. Thanks for pointing this out, nice catch!

After submitting one time entry with time remaining from the total goal I start the timer again to complete the goal. When I click the reset button, the timer is reset to the original goal. Wouldn't it make more sense if it was reset to the time remaining? Because a user has already logged some time so there is no need to reset it to the original goal. Not a big deal, but just some thoughts...

@cvtqx Thanks for the advice! After discussion with Jae, I think we will just stick to what we have for now, since the timer already auto set its goal to the remaining time, and if the user want to change its current remaining time, just use the add/subtract buttons to do so, no need to reset to its previous remaining time. The reset should just for resetting to its initial goal.

@wang9hu wang9hu requested review from cvtqx and KurtisIvey October 29, 2023 22:34
navneeeth
navneeeth previously approved these changes Oct 30, 2023
Copy link
Contributor

@navneeeth navneeeth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, @wang9hu! Great implementation! I tested your changes and they are quite the improvement from the previous release of the timer.

The timer buttons have tooltips displayed on hover and when logging the time before the timer runs out, the next goal is set to the time remaining from the last timer:

before_time_runs_out.mp4

When logging the time after the timer runs out, the next goal is what is set as the initial goal:

after_time_runs_out.mp4

If there are multiple tabs, the ringing effect is consistent:

multiple_tabs.mp4

And, the bug that I reported on Slack where the color and background color of '-15 m' button were faulty when the time is maximum, is also fixed:

Before:

-15 m button font

Now:

add_time_15m_button

@one-community one-community merged commit aeb8f4d into development Oct 31, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.