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

MudBaseInput: Make OnBlurred async #6633

Merged
merged 1 commit into from
Apr 12, 2023
Merged

Conversation

ScarletKuro
Copy link
Member

Description

Fixes: #6322
Wasn't catching exception since on blurr wasn't awaited (async void problem)

I believe since OnBlurred was protected internal it's not breaking change to change the signature

How Has This Been Tested?

New unit test + checked visually on https://try.mudblazor.com/snippet/QOwdkmvIplIxkslV

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.

@github-actions github-actions bot added bug Something does not work as intended/expected PR: needs review labels Apr 12, 2023
@ScarletKuro ScarletKuro requested a review from henon April 12, 2023 12:02
@ScarletKuro
Copy link
Member Author

Doesn't fixes the KeyDown down since the method isn't internal in MudBaseInput

@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.11 ⚠️

Comparison is base (49e627a) 90.63% compared to head (80db3af) 90.53%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #6633      +/-   ##
==========================================
- Coverage   90.63%   90.53%   -0.11%     
==========================================
  Files         399      399              
  Lines       13587    13613      +26     
==========================================
+ Hits        12315    12324       +9     
- Misses       1272     1289      +17     
Impacted Files Coverage Δ
src/MudBlazor/Components/Input/MudRangeInput.razor 85.71% <ø> (ø)
...azor/Components/NumericField/MudNumericField.razor 100.00% <ø> (ø)
.../MudBlazor/Components/TextField/MudTextField.razor 100.00% <ø> (ø)
src/MudBlazor/Base/MudBaseInput.cs 92.30% <100.00%> (ø)
src/MudBlazor/Base/MudFormComponent.cs 83.33% <100.00%> (-4.49%) ⬇️
src/MudBlazor/Components/Input/MudInput.razor 100.00% <100.00%> (ø)
src/MudBlazor/Components/Mask/MudMask.razor 100.00% <100.00%> (ø)
src/MudBlazor/Components/Mask/MudMask.razor.cs 94.90% <100.00%> (ø)
...r/Components/NumericField/MudNumericField.razor.cs 98.71% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@henon henon merged commit 2ea6065 into MudBlazor:dev Apr 12, 2023
4 checks passed
@ScarletKuro ScarletKuro deleted the fix_6322 branch April 12, 2023 14:28
@ScarletKuro
Copy link
Member Author

ScarletKuro commented Apr 12, 2023

It seems that my recent change resulted in a breaking change for those who inherit this type and previously used OnBlurred. I take full responsibility for this mistake. I was confused by the use of the word "internal" in the method signature and wrongly assumed that it would be a safe change since I thought the method was only visible within the library. However, it turns out that the method is actually marked as protected internal, which makes it visible to anyone who inherits MudBaseInput.
https://stackoverflow.com/questions/585859/what-is-the-difference-between-protected-and-protected-internal

@henon
Copy link
Collaborator

henon commented Apr 13, 2023

Well, the break already happened, and we don't guarantee that protected API won't be changed, so I think no revert is necessary.

ilovepilav pushed a commit to ilovepilav/MudBlazor that referenced this pull request Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exceptions in MudInput OnBlur handlers are not observable
3 participants