-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[Blazor] Implement API review feedback: rename pause/resume methods and PersistentState attribute #62549
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
Conversation
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
src/Components/Components/src/PersistentStateProviderServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the test results file. 3755f0d
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
…ture namespace and remove test file Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
src/Components/Components/src/PersistentStateProviderServiceCollectionExtensions.cs#L4 src/Components/Components/src/PersistentStateProviderServiceCollectionExtensions.cs(4,1): error IDE0005: (NETCORE_ENGINEERING_TELEMETRY=Build) Using directive is unnecessary. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005) |
…eCollectionExtensions Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
src/Components/test/testassets/TestContentPackage/DeclarativePersistStateComponent.razor#L11 src/Components/test/testassets/TestContentPackage/DeclarativePersistStateComponent.razor(11,6): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'SupplyParameterFromPersistentComponentStateAttribute' could not be found (are you missing a using directive or an assembly reference?) |
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Fixed the remaining attribute references in test asset files. Updated both DeclarativePersistStateComponent.razor and PersistentCounter.razor to use the new |
Check failure on line 148 in Build log @azure-pipelines Bash exited with code '1'. @azure-pipelines OpenQA.Selenium.JavaScriptException : javascript error: Blazor.pause is not a function @azure-pipelines OpenQA.Selenium.JavaScriptException : javascript error: Blazor.pause is not a function @azure-pipelines OpenQA.Selenium.JavaScriptException : javascript error: Blazor.pause is not a function @azure-pipelines OpenQA.Selenium.JavaScriptException : javascript error: Blazor.pause is not a function Look at the |
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Fixed the E2E test failure by updating the JavaScript call from |
src/Components/Components/test/TestResults/_pkrvmbietmlfzoi_2025-07-02_22_04_17.trx
Outdated
Show resolved
Hide resolved
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I searched through old names and they don't exist anymore, it did not miss anything.
/ba-g Unrelated build failure |
This PR implements the API review feedback for Blazor pause/resume functionality and declarative persistence component model as outlined in issue #62548.
Changes Made
1. JavaScript/TypeScript API Renames
Blazor.pause()
toBlazor.pauseCircuit()
Blazor.resume()
toBlazor.resumeCircuit()
GlobalExports.ts
2. C# Attribute Rename
SupplyParameterFromPersistentComponentStateAttribute
toPersistentStateAttribute
SupplyParameterFromPersistentComponentStateValueProvider
→PersistentStateValueProvider
SupplyParameterFromPersistentComponentStateProviderServiceCollectionExtensions
→PersistentStateProviderServiceCollectionExtensions
3. Public API Surface Updates
PublicAPI.Unshipped.txt
to reflect the new attribute and class namesRegisterPersistentComponentStateServiceCollectionExtensions
is already in the correct namespace (Microsoft.AspNetCore.Components.Infrastructure
)Example Usage
Before:
After:
Testing
Files Modified
The changes maintain full backward compatibility in terms of functionality while providing cleaner, more descriptive API names as requested in the API review.
Fixes #62548.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.