Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Newsletter: Show guidance when Substack images fail to import#109003

Draft
robertbpugh wants to merge 1 commit intotrunkfrom
add/substack-import-failed-images-guidance
Draft

Newsletter: Show guidance when Substack images fail to import#109003
robertbpugh wants to merge 1 commit intotrunkfrom
add/substack-import-failed-images-guidance

Conversation

@robertbpugh
Copy link
Contributor

Part of NL-482

Proposed Changes

  • Add FailedImagesMessage component to the Substack import conversion summary screen
  • Shows when backend reports failedImagesCount > 0 in the import data
  • Explains that Substack did not include images in the export
  • Provides numbered steps to manually save and re-upload images, with links to Media Library and Image block support docs
  • Uses _n for proper singular/plural handling
  • Adds SCSS for the ordered list, using logical CSS properties (padding-inline-start)

Why are these changes being made?

When importing from Substack, ~33% of images fail because Substack hosts them in protected storage that denies external access. The importer already surfaces unsupported file types and unconverted content, but silently drops images that fail with HTTP errors. Users see broken images with no explanation or guidance on how to fix them.

This PR adds actionable guidance so users know why images are missing and exactly how to fix them.

Note: This PR is safely inert until a corresponding backend change ships to populate failedImagesCount in the API response. Until then, the field defaults to 0 and the component does not render.

Testing Instructions

  1. Import a Substack export at /import/{site}/newsletter/substack
  2. Verify the conversion summary looks identical to before (no failedImagesCount from backend yet)
  3. To test the new component, use browser DevTools to inject mock data into the React component props:
    • Set failedImagesCount = 5 → verify message appears with "5 images could not be imported..."
    • Set failedImagesCount = 1 → verify singular "1 image could not be imported..."
    • Set failedImagesCount = 0 → verify no message appears
  4. Verify "Media Library" and "Image block" links point to correct support docs
  5. Verify existing unsupported file types and unconverted content messages still render

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

When importing from Substack, images frequently fail because Substack
hosts them in protected S3 buckets that deny external access. The
importer currently shows unsupported file types and unconverted content,
but silently drops images that fail with HTTP errors.

Add a FailedImagesMessage component to the conversion summary that
explains images were not included in the export and provides numbered
steps to manually save and re-upload them, with links to the Media
Library and Image block support docs.

The component renders when the backend provides a failedImagesCount
field in the import data. Until the corresponding backend change ships,
this code is safely inert (the field defaults to 0).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • help-center

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/substack-import-failed-images-guidance on your sandbox.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants