AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

feat: timer field

Open zoli opened this issue 1 year ago β€’ 2 comments

Timer field type which stores time in minutes. More details about this feature on the related issue #4083. Resolves #4083.

Feature Preview

PR Checklist

  • [x] My code adheres to AppFlowy's Conventions
  • [x] I've listed at least one issue that this PR fixes in the description above.
  • [x] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • [x] All existing tests are passing.

zoli avatar May 16 '24 21:05 zoli

πŸ₯· Ninja i18n – πŸ›ŽοΈ Translations need to be updated

Project /project.inlang

lint rule new reports level link
Missing translation 26 warning contribute (via Fink 🐦)

github-actions[bot] avatar May 16 '24 21:05 github-actions[bot]

https://github.com/AppFlowy-IO/AppFlowy/assets/3286303/19c5d423-9f5b-4d12-8940-8a3f9dd62ea2

zoli avatar May 21 '24 09:05 zoli

Also something I was thinking about when I saw "Timer", is that I was expecting it to count down. Otherwise I guess calling it "Time" is more relevant.

Xazin avatar May 29 '24 22:05 Xazin

Also something I was thinking about when I saw "Timer", is that I was expecting it to count down. Otherwise I guess calling it "Time" is more relevant.

You are right about timer but I think maybe stopwatch is a better name. I also want to add time tracking feature to this later and it works like count up.

zoli avatar May 30 '24 05:05 zoli

Thinking about this, It can be a general field type (I'm not sure about the name) which the user can choose to be a timer (count down) or stopwatch (count up) in type options. What do you think @Xazin?

zoli avatar May 31 '24 05:05 zoli

Thinking about this, It can be a general field type (I'm not sure about the name) which the user can choose to be a timer (count down) or stopwatch (count up) in type options. What do you think @Xazin?

Yeah that is a good idea. Kind of like selecting a number format.

Xazin avatar May 31 '24 07:05 Xazin

So I will change the field type name to Time and will add a stopwatch and timer option later in a separate PR.

zoli avatar May 31 '24 07:05 zoli

So I will change the field type name to Time and will add a stopwatch and timer option later in a separate PR.

Sounds good, feel free to ping me when you have renamed the field, I tested and feature works as expected. πŸ‘

I think the time type data can be in minutes, but for Stop timer or Count down timer, it should be a start timestamp.

Xazin avatar May 31 '24 07:05 Xazin

@Xazin I renamed the field type to time and moved the formatting function to the flutter frontend. I will implement these features on other PRs:

  • Having precision option (store by minutes or second)
  • Timer and Stopwatch as type option
  • More localization support as per your review comment.
  • Tracking time button for timer and stopwatch

zoli avatar Jun 02 '24 13:06 zoli

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.74%. Comparing base (94f9349) to head (d150e0a). Report is 790 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##            main    #5349       +/-   ##
==========================================
+ Coverage   9.70%   86.74%   +77.04%     
==========================================
  Files        685      217      -468     
  Lines      31812     5032    -26780     
  Branches       0      831      +831     
==========================================
+ Hits        3086     4365     +1279     
+ Misses     28726      561    -28165     
- Partials       0      106      +106     
Flag Coverage Ξ”
appflowy_flutter_unit_test ?
appflowy_web_app 86.74% <ΓΈ> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 13 '24 06:06 codecov[bot]