-
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
[Fabric] Implement onProgress for Image #14493
Merged
anupriya13
merged 6 commits into
microsoft:main
from
anupriya13:user/anuverma/onProgressImage
Apr 10, 2025
Merged
[Fabric] Implement onProgress for Image #14493
anupriya13
merged 6 commits into
microsoft:main
from
anupriya13:user/anuverma/onProgressImage
Apr 10, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acoates-ms
requested changes
Apr 9, 2025
vnext/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp
Outdated
Show resolved
Hide resolved
acoates-ms
approved these changes
Apr 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
API: Completion
Area: Fabric
Support Facebook Fabric
Area: Image
enhancement
New Architecture
Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric
Parity: Fabric vs. Paper
RNW Fabric does not look or behave like RNW Paper
Workstream: Component Parity
Close the parity gap between RNW and RN for core RN components and their supporting APIs.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Why
What is the motivation for this change? Add a few sentences describing the context and overall goals of the pull request's commits.
Implement the onProgress property for the fabric implementation of Image.
Note: At one point there was a TODO for this in our new fabric code.
This property was not available in RNW Paper but could be implemented for Fabric.
See https://reactnative.dev/docs/image#onprogress for details.
Resolves #13118 and #13752
What
What changes were made to the codebase to solve the bug, add the functionality, etc. that you specified above.
Added a progress Callback during request start for image downloading that keeps track of progress and invokes
observerCoordinator->nativeImageResponseProgress
Refer:
https://learn.microsoft.com/en-us/uwp/api/windows.web.http.httpstringcontent.writetostreamasync?view=winrt-26100
https://learn.microsoft.com/en-us/uwp/api/windows.web.http.httpstringcontent.readasinputstreamasync?view=winrt-26100
Key Differences between ReadAsInputStreamAsync and WriteToStreamAsync:
Screenshots
Add any relevant screen captures here from before or after your changes.
Testing
If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios.
Optional: Describe the tests that you ran locally to verify your changes.
Changelog
Should this change be included in the release notes: indicate yes or no
Yes
Add a brief summary of the change to use in the release notes for the next release.
Implemented onProgress event for Image in Fabric new architecture.
Invoked on download progress.
Microsoft Reviewers: Open in CodeFlow