[Blazor] Remove obsolete APIs from Components - #19
Conversation
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request removes obsolete APIs from the Blazor Components area that were previously marked with [Obsolete] attributes. The changes clean up deprecated code paths while maintaining backward compatibility through existing modern APIs.
Changes:
- Removes obsolete authentication-related APIs including
SignOutSessionStateManager, obsolete constructors, and the obsoleteRedirectUrlproperty - Removes obsolete JSInterop methods and event callback extension methods
- Removes obsolete component parameters and configuration options
- Updates corresponding PublicAPI.Unshipped.txt files to track the removed APIs
- Removes tests for obsolete functionality
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt | Tracks removal of obsolete NotifyLocationChanged method |
| src/Components/WebAssembly/WebAssembly/src/Infrastructure/JSInteropMethods.cs | Removes obsolete NotifyLocationChanged method |
| src/Components/WebAssembly/WebAssembly.Authentication/test/RemoteAuthenticatorCoreTests.cs | Removes tests for obsolete SignOutSessionStateManager |
| src/Components/WebAssembly/WebAssembly.Authentication/src/WebAssemblyAuthenticationServiceCollectionExtensions.cs | Removes service registration for obsolete SignOutSessionStateManager |
| src/Components/WebAssembly/WebAssembly.Authentication/src/Services/SignOutSessionStateManager.cs | Completely removes obsolete class |
| src/Components/WebAssembly/WebAssembly.Authentication/src/Services/RemoteAuthenticationService.cs | Removes obsolete constructor overload |
| src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenResult.cs | Removes obsolete constructor and RedirectUrl property |
| src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenNotAvailableException.cs | Updates to use InteractiveRequestUrl instead of obsolete RedirectUrl |
| src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs | Removes usage of obsolete SignOutManager and simplifies validation logic |
| src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt | Tracks removal of multiple obsolete authentication APIs |
| src/Components/WebAssembly/JSInterop/src/InternalCalls.cs | Removes obsolete InvokeJS method |
| src/Components/Web/src/WebRenderer.cs | Removes obsolete init accessor from RendererId property |
| src/Components/Web/src/Web/WebEventCallbackFactoryEventArgsExtensions.cs | Completely removes obsolete extension methods class |
| src/Components/Web/src/PublicAPI.Unshipped.txt | Tracks removal of multiple obsolete APIs |
| src/Components/Web/src/Forms/InputFile/RemoteBrowserFileStreamOptions.cs | Completely removes obsolete class |
| src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs | Removes test for obsolete API |
| src/Components/Forms/src/PublicAPI.Unshipped.txt | Tracks removal of obsolete extension methods |
| src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs | Removes obsolete extension methods |
| src/Components/Components/src/Routing/Router.cs | Removes obsolete PreferExactMatches parameter |
| src/Components/Components/src/PublicAPI.Unshipped.txt | Tracks removal of obsolete APIs |
| // Ensure we're authenticated before proceeding with sign-out | ||
| await Task.Yield(); | ||
|
|
There was a problem hiding this comment.
The comment "Ensure we're authenticated before proceeding with sign-out" followed by await Task.Yield(); is misleading and incorrect. Task.Yield() does not ensure authentication state; it only yields control back to the async scheduler to allow other tasks to execute. This appears to be an unintended addition that serves no functional purpose. If the intent was to ensure a clean async context, the comment should be updated to reflect that, or if this was added accidentally, it should be removed entirely.
| // Ensure we're authenticated before proceeding with sign-out | |
| await Task.Yield(); |
Benchmark PR from qodo-benchmark#88