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

Add support for seconds in date_utils #4690

Merged
merged 5 commits into from
Apr 15, 2024
Merged

Conversation

yykcool
Copy link
Contributor

@yykcool yykcool commented Apr 15, 2024

Problem
missed out support for seconds in functions in date_utils.js

Changes
added second support

Contribution checklist

  • I have followed the contributing guidelines.
  • I have added sufficient test coverage for my changes.
  • I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.

@yykcool yykcool marked this pull request as draft April 15, 2024 14:05
Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

⚠️ This pull request was not sent to the PullRequest network because the pull request is a draft.

@yykcool yykcool marked this pull request as ready for review April 15, 2024 14:05
Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

✅ This pull request was sent to the PullRequest network for review. Expert reviewers are now being matched to your request based on the code's requirements. Stay tuned!

What to expect from this code review:
  • Comments posted to any areas of potential concern or improvement.
  • Detailed feedback or actions needed to resolve issues that are found.
  • Turnaround times vary, but we aim to be swift.

@yykcool you can click here to see the review status or cancel the code review job.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

PullRequest Breakdown

Reviewable lines of change

+ 48
- 15

57% JavaScript (tests)
43% JavaScript

Type of change

Feature - These changes are adding a new feature or improvement to existing code.

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.01%. Comparing base (4500100) to head (9af5770).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4690      +/-   ##
==========================================
+ Coverage   97.00%   97.01%   +0.01%     
==========================================
  Files          28       28              
  Lines        2641     2650       +9     
  Branches     1119     1137      +18     
==========================================
+ Hits         2562     2571       +9     
  Misses         79       79              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thanks for adding tests!

Image of Simon Simon


Reviewed with ❤️ by PullRequest

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

The changes look good but I just have one concern regarding correct testing.

Image of Curtis Larson Curtis Larson


Reviewed with ❤️ by PullRequest


expect(
Array.from(disabledTimeItems).map((node) => node.textContent),
).toContain("01:00:00");
Copy link

Choose a reason for hiding this comment

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

Shouldn't this check to see if the seconds are visible? Unless i'm misunderstanding the test.

🔸 Improve Test Coverage (Important)

Image of Curtis Larson Curtis Larson

Copy link
Contributor Author

@yykcool yykcool Apr 15, 2024

Choose a reason for hiding this comment

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

includeTimes tells the component to mark any pre-existing times (derived from the interval) that are not in the array as disabled.

this part checks that 01:00:00 and 00:00:00 are correctly disabled because they are not included

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.

2 participants