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

Pickers: change API to async to avoid async void and fire-and-forget #8506

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

ScarletKuro
Copy link
Member

@ScarletKuro ScarletKuro commented Mar 27, 2024

Description

The public API that changed, private api is not included in the list

MudColorPicker:

  • OnPickerClosed -> OnPickerClosedAsync

MudBaseDatePicker:

  • OnPickerOpened -> OnPickerOpenedAsync
  • OnDayClicked -> OnDayClickedAsync
  • OnMonthSelected -> OnMonthSelectedAsync
  • OnYearClicked -> OnYearClickedAsync

MudDatePicker:

  • OnDayClicked -> OnDayClickedAsync
  • OnMonthSelected -> OnMonthSelectedAsync
  • OnYearClicked -> OnYearClickedAsync
  • OnOpened -> OnOpenedAsync
  • Submit -> SubmitAsync
  • Clear -> ClearAsync

MudDateRangePicker:

  • OnDayClicked -> OnDayClickedAsync
  • OnOpened -> OnOpenedAsync
  • Submit -> SubmitAsync
  • Clear -> ClearAsync

MudPicker:

  • ToggleOpen -> ToggleOpenAsync
  • Close -> CloseAsync
  • Open -> OpenAsync
  • Submit -> SubmitAsync
  • Clear -> ClearAsync
  • ToggleState -> ToggleStateAsync
  • OnOpened -> OnOpenedAsync
  • OnClosed -> OnClosedAsync
  • OnPickerOpened -> OnPickerOpenedAsync
  • OnPickerClosed -> OnPickerClosedAsync
  • ResetValue -> ResetValueAsync

MudTimePicker:

  • OnPickerOpened -> OnPickerOpenedAsync
  • Submit -> SubmitAsync
  • Clear -> ClearAsync
  • SubmitAndClose -> SubmitAndCloseAsync
  • ChangeMinute -> ChangeMinuteAsync
  • ChangeHour -> ChangeHourAsync
  • ReturnTimeBackUp -> ReturnTimeBackUpAsync

How Has This Been Tested?

Brief visual testing via doc.
I think existing current text should cover most of the things.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@ScarletKuro ScarletKuro changed the title Pickes: change API to async to avoid async void and fire-and-forget Pickers: change API to async to avoid async void and fire-and-forget Mar 27, 2024
@ScarletKuro ScarletKuro added API change API that needs approval refactor Refactoring of code. No bug fixes or new features labels Mar 27, 2024
@ScarletKuro
Copy link
Member Author

ScarletKuro commented Mar 27, 2024

Failing test are not related to this change
I fixed it in here #8507 and rebased the current branch.

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

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

Project coverage is 89.28%. Comparing base (9700485) to head (dd948f5).
Report is 1 commits behind head on dev.

Files Patch % Lines
...lazor/Components/TimePicker/MudTimePicker.razor.cs 93.75% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #8506      +/-   ##
==========================================
- Coverage   89.34%   89.28%   -0.07%     
==========================================
  Files         411      411              
  Lines       12146    11905     -241     
  Branches     2423     2357      -66     
==========================================
- Hits        10852    10629     -223     
+ Misses        760      753       -7     
+ Partials      534      523      -11     

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

@henon henon added v7 New major MudBlazor version and removed PR: needs review labels Mar 28, 2024
@ScarletKuro
Copy link
Member Author

forgot that the ResetValue (obsolete) was replaced with ResetValueAsync in MudPicker

@henon henon mentioned this pull request Mar 28, 2024
@henon henon merged commit 70034b9 into MudBlazor:dev Mar 28, 2024
3 checks passed
@henon
Copy link
Collaborator

henon commented Mar 28, 2024

Thanks

Added to v7.0.0 Migration Guide #8447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change API that needs approval breaking change refactor Refactoring of code. No bug fixes or new features v7 New major MudBlazor version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants