-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
MudDropZone: Add nullable annotation and fix #6551, #4695. #6561
MudDropZone: Add nullable annotation and fix #6551, #4695. #6561
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## dev #6561 +/- ##
==========================================
- Coverage 91.46% 91.39% -0.08%
==========================================
Files 393 397 +4
Lines 14876 14915 +39
==========================================
+ Hits 13607 13631 +24
- Misses 1269 1284 +15
... 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. |
I was browsing the issue list of MudBlazor and discovered this issue #4695, this PR covers this as well. |
Idea for v7.
Means it's an abnormal situation. But this would mean a little breaking change, so I'd move to v7. I would also maybe consider adding a "class" constraint, this would allow some better null checks, I don't think u can use |
Done, added to v7 project: https://github.com/MudBlazor/MudBlazor/projects/13#card-88710515 |
Good job Kuro, thanks! |
Description
Fixes #6551 and fixes #4695, and fixes #4489
Also contributes to this #6535
Important notes about PR
1.I have moved:
To their own files, reasoning: the
MudDropContainer.razor.cs
was somehow way too big, it was hard to navigate and go through the code. I think it's justified considering that there are no open pull requests on this component(there is one, but it already has conflicts and needs rework).2.There were some typo fixes, but only the comments and methods that are private. The public one will be a separate PR.
3.
private IEnumerable<T> GetItems()
was changed toT[] GetItems()
.It was already calling
.ToArray()
but then for some reason it was casted back to IEnumerable. The problem with this is that in places that called this method it was doing multiple enumeration which is a bad practice, it's better to keep it array since it was already converted to array by the original author of the code.4.Coverage might drop, since there is constant check if _transaction and container is null. But those are important, especially considering that multiple methods can manipulate the _transcation value at the same time, which is why there was a problem.
How Has This Been Tested?
Current unit tests and manual testing on the docs, tested the on this scenario too https://try.mudblazor.com/snippet/mkGHOxGtQttdZNao.
Types of changes
Checklist:
dev
).