feat: timer field
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.
π₯· Ninja i18n β ποΈ Translations need to be updated
Project /project.inlang
| lint rule | new reports | level | link |
|---|---|---|---|
| Missing translation | 26 | warning | contribute (via Fink π¦) |
https://github.com/AppFlowy-IO/AppFlowy/assets/3286303/19c5d423-9f5b-4d12-8940-8a3f9dd62ea2
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.
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.
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?
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.
So I will change the field type name to Time and will add a stopwatch and timer option later in a separate PR.
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 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
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.