Skip to content

Conversation

@manzoorwanijk
Copy link
Member

Related to SOCIAL-51

Currently in ConnectionIcon component, if the initial profilePicture has 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:

  • Update the ConnectionIcon component 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 it

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

Testing instructions:

  • Test this on a site which has a Threads, Instagram or a LinkedIn connection with an expired profile picture link
  • Apply 196015-ghe-Automattic/wpcom to your sandbox
  • Point your site and the public API to your sandbox
  • Share a post to the account which has the expired profile picture
  • Go to Jetpack > Social page
  • Confirm that the profile picture is updated after the connection tests API call finishes.
BEFORE AFTER
Screen.Recording.2025-11-14.at.2.42.05.PM.mov
Screen.Recording.2025-11-14.at.2.43.16.PM.mov

…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.
@manzoorwanijk manzoorwanijk requested review from a team and Copilot November 14, 2025 09:24
@manzoorwanijk manzoorwanijk self-assigned this Nov 14, 2025
@manzoorwanijk manzoorwanijk added [Type] Bug When a feature is broken and / or not performing as intended [Status] Needs Team Review Obsolete. Use Needs Review instead. labels Nov 14, 2025
@github-actions github-actions bot added [Feature] Publicize Now Jetpack Social, auto-sharing [JS Package] Publicize Components [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Social Issues about the Jetpack Social plugin RNA labels Nov 14, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

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:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: December 2, 2025

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.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the fix/social/connection-icon-update branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/social/connection-icon-update

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

Copilot finished reviewing on behalf of manzoorwanijk November 14, 2025 09:27
Copy link
Contributor

Copilot AI left a 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.

@jp-launch-control
Copy link

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/js-packages/publicize-components/src/components/connection-icon/index.jsx 13/16 (81.25%) 1.25% 0 💚

Full summary · PHP report · JS report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Publicize Now Jetpack Social, auto-sharing [JS Package] Publicize Components [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Social Issues about the Jetpack Social plugin RNA [Status] Needs Team Review Obsolete. Use Needs Review instead. [Type] Bug When a feature is broken and / or not performing as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants