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

Implemented a one-click toggle for the custom time input bar #4956

Closed
wants to merge 2 commits into from

Conversation

ezParth
Copy link

@ezParth ezParth commented Jul 5, 2024


name: “Fix time input focus issue”

about: The time input in the "Custom time input" example does not focus when clicked on for the first time. It requires two clicks to focus.

title: "Custom time input needs 2 clicks to focus"

labels: ""

assignees: "@martijnrusschen"

Description

Linked issue: #4949

Problem
The time input in the “Custom time input” example does not focus when clicked on for the first time. It requires two clicks to focus.

Changes
I have fixed the issue by ensuring that the time input is focused on the first click.

Screenshots

Screenshot (22)
In the right side when we click the time input bar, I have ensured that the time input is focused on the first click.

To reviewers

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.

@ezParth ezParth changed the title Added one click toggle of custom time input bar Implemented a one-click toggle for the custom time input bar Jul 5, 2024
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.

@ezParth 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

+ 20
- 10

73% JavaScript
27% TSX

Type of change

Minor Update - These changes appear to be a minor update to existing functionality and features.

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 change looks good to me. I have no concerns.

Image of Jacob Jacob


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.

Based on the code it seems like it would fix the problem so I'm giving this a 👍. It would be nice to also have a test included for this special logic so it doesn't break in the future.

Image of Joey G Joey G


Reviewed with ❤️ by PullRequest

@martijnrusschen
Copy link
Member

Please make sure to fix the code formatting with prettier.

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

+ 20
- 10

73% JavaScript
27% TSX

Type of change

Minor Update - These changes appear to be a minor update to existing functionality and features.

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.34%. Comparing base (17a0a33) to head (c51950c).
Report is 276 commits behind head on main.

Files with missing lines Patch % Lines
src/calendar.tsx 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4956      +/-   ##
==========================================
- Coverage   96.71%   96.34%   -0.38%     
==========================================
  Files          28       28              
  Lines        3287     3307      +20     
  Branches     1368     1389      +21     
==========================================
+ Hits         3179     3186       +7     
- Misses        104      121      +17     
+ Partials        4        0       -4     

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

const handleInputClick = () => {
inputRef.current.focus();
};
const inputRef = React.createRef();
Copy link
Member

Choose a reason for hiding this comment

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

React is not defined. Curious if we can do this without importing React. None of the other examples needed this.

Copy link

Choose a reason for hiding this comment

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

None of the other examples import anything else for that matter. Given that, I presume they're meant to function standalone.

Image of Jacob Jacob

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.

Due to inactivity, PullRequest has cancelled this review job. You can reactivate the code review job from the PullRequest dashboard.

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