Skip to content

Conversation

@ScarletKuro
Copy link
Contributor

Please, test the components.
I tested visually but I don't know the specifics how the components should behave and the current website is down.
Tests are also green, but there are only 170 tests which isn't enough.

P.S. Don't use base.XXX unless you overload the method and know you you need the default behavior.

You used the base.ConvertSet, but when you overload it, now you are calling the base one instead of your custom one, as result you need to change everywhere.

@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

❌ Patch coverage is 69.76744% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.98%. Comparing base (d3035ec) to head (5b22e90).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...xtensions/Components/ComboBox/MudComboBox.razor.cs 53.33% 4 Missing and 3 partials ⚠️
...sions/Components/ComboBox/MudComboBoxItem.razor.cs 53.33% 2 Missing and 5 partials ⚠️
...ensions/Components/ChipField/MudChipField.razor.cs 20.00% 3 Missing and 1 partial ⚠️
...Extensions/Components/ChipField/MudChipField.razor 0.00% 0 Missing and 2 partials ⚠️
...ensions/Components/CodeInput/MudCodeInput.razor.cs 0.00% 2 Missing ⚠️
...ns/Components/LoadingButton/MudLoadingButton.razor 0.00% 0 Missing and 1 partial ⚠️
...ents/SelectExtended/MudSelectItemExtended.razor.cs 75.00% 0 Missing and 1 partial ⚠️
...ts/SelectExtended/MudSelectItemGroupExtended.razor 50.00% 0 Missing and 1 partial ⚠️
...azor.Extensions/Components/Wheel/MudWheel.razor.cs 83.33% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (69.76%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #592      +/-   ##
==========================================
+ Coverage   67.92%   67.98%   +0.05%     
==========================================
  Files         105      105              
  Lines        7415     7408       -7     
  Branches     1280     1275       -5     
==========================================
- Hits         5037     5036       -1     
+ Misses       1900     1899       -1     
+ Partials      478      473       -5     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

/// </summary>
protected MudBaseInputExtended()
{
Converter = new DefaultConverter<T>
Copy link
Contributor Author

@ScarletKuro ScarletKuro Jan 25, 2026

Choose a reason for hiding this comment

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

No need, MudBaseInput already sets a GetDefaultConverter() => DefaultConverter<T>

OnDebounceIntervalElapsed="@(async() => await OnDebounceIntervalElapsed.InvokeAsync())"
OnInternalInputChanged="@(async() => await OnInternalInputChanged.InvokeAsync())"
ShrinkLabel="@(Values?.Any() ?? false)"
ShrinkLabel="@(_valuesState.Value?.Any() ?? false)"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rule of parameter state. Always use the backing field, no exceptions

await MudComboBox.ToggleOption(this, !Selected);
await InvokeAsync(StateHasChanged);
await MudComboBox.FocusAsync();
if (MudComboBox is not null)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I saw that in many places MudComboBox has a null check but not here, and for some reason the MudComboBox wasn't declared as null possible, but as null!, you need to decide here. Can it be null or not? If not then you can remove the null checks everywhere.

@if (ButtonVariant == ButtonVariant.Button)
{
<MudButton Disabled="@(Disabled ? true : _loading.Value ? true : false)"
<MudButton Disabled="@(Disabled || (_loading.Value))"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same just simplified.
We don't do with booleans _loading.Value ? true : false just straight _loading.Value as is already either true or false.

field.Find("input").Input(new ChangeEventArgs() { Value = "sdfg" });
await comp.InvokeAsync(() => comp.Instance.HandleBeforeInput(new BeforeInputEventArgs() { Data = " ", InputType = "insert" }));
comp.Instance.Values.Should().BeEquivalentTo(new List<string> { "asdf", "asd", "sdfg" });
comp.Instance.GetState(x => x.Values).Should().BeEquivalentTo(new List<string> { "asdf", "asd", "sdfg" });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should use GetState when you accessing parameter state value from other places, otherwise the value might be incorrect.

@ScarletKuro
Copy link
Contributor Author

ScarletKuro commented Jan 25, 2026

@mckaragoz feel free to reject some changes, as I did some cosmetics one too. You can make ur own PR based on this.
But yeah, better test it if you are going to merge it. I tested what I could

@mckaragoz
Copy link
Contributor

mckaragoz commented Jan 25, 2026

Thanks, thats bunch of work and seems a great PR, i will look at it. Some components written 4 years ago, these ones do not share same quality with new ones. I will handle all components one by one and want AI to review also (between Mud 9 and 10).

@mckaragoz
Copy link
Contributor

And yes don't trust the tests these are most of basic render tests and can only catch initial null references etc. Only some components like select and stepper has real tests.

@mckaragoz mckaragoz merged commit 71273ad into CodeBeamOrg:dev Jan 25, 2026
2 of 3 checks passed
@mckaragoz
Copy link
Contributor

Thanks 🥇

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