-
Notifications
You must be signed in to change notification settings - Fork 841
Social: Fix connection icon not reflecting the change when profile picture is updated #45937
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
base: trunk
Are you sure you want to change the base?
Conversation
…cture is updated. Update the ConnectionIcon component to properly reflect changes when the profile picture is updated. This resolves an issue where the icon would not update if the profile picture changed by tracking image errors per profile picture.
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Social plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
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.
Pull Request Overview
This PR fixes an issue where the ConnectionIcon component fails to update when a connection's profile picture URL changes. Previously, the component tracked image loading errors with a boolean flag, which prevented it from attempting to load new URLs after an initial error. The fix changes the error tracking to store the specific URL that failed, allowing new URLs to be attempted.
- Changed error tracking from a boolean flag to storing the actual failed URL
- Updated the display logic to compare the current URL against the failed URL
- Added changelog entries for three affected packages
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| projects/js-packages/publicize-components/src/components/connection-icon/index.jsx | Updated error state tracking to store failed URL instead of boolean, enabling proper updates when profile picture URL changes |
| projects/plugins/social/changelog/fix-social-connection-icon-update | Changelog entry documenting the bug fix |
| projects/plugins/jetpack/changelog/fix-social-connection-icon-update | Changelog entry documenting the bug fix |
| projects/js-packages/publicize-components/changelog/fix-social-connection-icon-update | Changelog entry documenting the bug fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code Coverage SummaryCoverage changed in 1 file.
|
Related to SOCIAL-51
Currently in
ConnectionIconcomponent, if the initialprofilePicturehas error loading, it remains in the same state if the subsequent changes to the profile picture fix the loading issue.For example, if a connection has a profile pitcture that has its URL expired, it will err on initial load. Ideally, connection test result returns the updated profile picture when available but it's not updated in the icon because the state for the image error is set on the initial error which is never changed when a new image is received.
Proposed changes:
ConnectionIconcomponent to properly reflect changes when the profile picture is updated. It now stores the error per URL instead of the boolean flag. So, if the URL changes, it also changes the error associated with itOther information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Screen.Recording.2025-11-14.at.2.42.05.PM.mov
Screen.Recording.2025-11-14.at.2.43.16.PM.mov