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

Added Date and Time Hint Text #2782

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

anandwana001
Copy link
Collaborator

Fixes #2706

@... PTAL?

Screenshot 2024-10-04 at 1 29 54 PM
Screenshot 2024-10-04 at 1 29 47 PM
Screenshot 2024-10-04 at 1 29 41 PM
Screenshot 2024-10-04 at 1 29 33 PM

Copy link

codecov bot commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 88.23529% with 4 lines in your changes missing coverage. Please review.

Project coverage is 61.00%. Comparing base (ee40584) to head (7a673ce).

Files with missing lines Patch % Lines
...d/ui/datacollection/tasks/time/TimeTaskFragment.kt 82.35% 1 Missing and 2 partials ⚠️
...d/ui/datacollection/tasks/date/DateTaskFragment.kt 94.11% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2782      +/-   ##
============================================
+ Coverage     60.85%   61.00%   +0.15%     
- Complexity     1160     1162       +2     
============================================
  Files           265      265              
  Lines          6149     6183      +34     
  Branches        858      859       +1     
============================================
+ Hits           3742     3772      +30     
- Misses         1921     1922       +1     
- Partials        486      489       +3     
Files with missing lines Coverage Δ
...d/ui/datacollection/tasks/date/DateTaskFragment.kt 96.15% <94.11%> (-0.99%) ⬇️
...d/ui/datacollection/tasks/time/TimeTaskFragment.kt 82.00% <82.35%> (+0.18%) ⬆️

Comment on lines +65 to +74
val hint =
pattern
.replace("yyyy", "YYYY") // Full year
.replace("yy", "YY") // Short year
.replace("MMMM", "MMMM") // Full month name
.replace("MMM", "MMM") // Abbreviated month name
.replace("MM", "MM") // Month (two-digit numeric)
.replace("M", "MM") // Single-digit month to two-digit
.replace("dd", "DD") // Two-digit day
.replace("d", "DD") // Single-digit day to two-digit
Copy link
Member

Choose a reason for hiding this comment

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

Can this be replaced with toUpper()?

Comment on lines +66 to +73
timeFormat
.toPattern()
.replace("hh", "HH") // 12-hour format to 2-digit hour (12-hour clock)
.replace("h", "HH") // 12-hour format to 2-digit hour (12-hour clock)
.replace("HH", "HH") // 24-hour format
.replace("mm", "MM") // Minutes (two-digit)
.replace("ss", "SS") // Seconds (two-digit)
.replace("a", "AM/PM") // AM/PM indication with a space
Copy link
Member

Choose a reason for hiding this comment

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

Same as previous comment

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.

[Date and time tasks] UX Bug: UI hint missing on date and time tasks
3 participants