Skip to content

[DatePicker] Added OnDoubleClick event and DoubleClickToDate parameter #2567

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

Merged
merged 3 commits into from
Aug 24, 2024

Conversation

RickyLin
Copy link
Contributor

@RickyLin RickyLin commented Aug 22, 2024

Pull Request

📖 Description

  1. Added OnDoubleClick event to DatePicker component.
  2. Added DoubleClickToDate parameter to DatePicker component.
  3. Updated DatePickerDefault page in demo site to add DoubleClickToDate option

🎫 Issues

The PR was related to

  1. The discussion How can I extend FluentDatePicker to support double-click event on its text field? #2524 How can I extend FluentDatePicker to support double-click event on its text field?
  2. The PR [DatePicker] Added OnDoubleClick event and DoubleClickToToday parameter. #2563 [DatePicker] Added OnDoubleClick event and DoubleClickToToday parameter.

👩‍💻 Reviewer Notes

This is the first PR of the 2 separated PRs asked by @dvoituron which implemented the DoubleClickToDate feature only.

📑 Test Plan

This PR kept the FluentOverlay as-is, so it's very difficult to trigger the double-click event on the text field of the date picker, thus difficult to see this feature works. Commenting out the FluentOverlay temporarily could help a lot during the manual tests.

However, the FluentOverlay has no side-effect when running the test method FluentDatePicker_DoubleClickToSetTodayInTextField, so it runs successfully. I think that's a sample of the cases that automatic tests are not exactly the same as manual tests.

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new component
  • I have modified an existing component
  • I have validated the Unit Tests for an existing component

⏭ Next Steps

I'll move the rest "FluentOverlay replacement" part of the original PR #2563 to a new PR.

@RickyLin RickyLin changed the title [FluentDatePicker] Added OnDoubleClick event and DoubleClickToToday parameter [DatePicker] Added OnDoubleClick event and DoubleClickToToday parameter Aug 22, 2024
@RickyLin RickyLin requested a review from dvoituron August 23, 2024 07:33
@RickyLin RickyLin requested a review from vnbaaij August 23, 2024 10:25
@dvoituron
Copy link
Collaborator

All is fine for me. @vnbaaij ?

@RickyLin Could you update the title and description of the PR so that they are consistent with the last modification: DoubleClickToDate. That will be easier for our Release Notes :-)

@RickyLin RickyLin changed the title [DatePicker] Added OnDoubleClick event and DoubleClickToToday parameter [DatePicker] Added OnDoubleClick event and DoubleClickToDate parameter Aug 24, 2024
@RickyLin
Copy link
Contributor Author

Hi @dvoituron,
The title and description were updated.

@RickyLin
Copy link
Contributor Author

In addition, is there a better Blazor/C# solution coming up which addresses the current FluentOverlay issue? If not for the time being, I'm going to prepare and send the second PR that is mentioned in the "Next Steps".

@vnbaaij vnbaaij merged commit 1656e40 into microsoft:dev Aug 24, 2024
4 checks passed
@vnbaaij vnbaaij added this to the v4.9.4 milestone Aug 24, 2024
@dvoituron
Copy link
Collaborator

In addition, is there a better Blazor/C# solution coming up which addresses the current FluentOverlay issue? If not for the time being, I'm going to prepare and send the second PR that is mentioned in the "Next Steps".

I would like to try to find a solution to extend this FluentOverlay (or if you have an idea to use this way). I will try to do that in some days.

@dvoituron
Copy link
Collaborator

dvoituron commented Aug 25, 2024

@RickyLin I found a solution using the FluentOverlay adapted like this: See #2580

peek_2

@RickyLin RickyLin deleted the double-click-to-today branch August 26, 2024 00:27
dannyldj pushed a commit to dannyldj/fluentui-blazor that referenced this pull request Sep 26, 2024
…icrosoft#2567)

* [FluentDatePicker] Added OnDoubleClick event and DoubleClickToToday parameter.

* [DatePicker] DoubleClickToToday was changed to DoubleClickToDate. Added test for OnDoubleClick event.
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.

3 participants