Skip to content
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

Fix broken placeholder images #923

Merged
merged 13 commits into from
Feb 17, 2025
Merged

Conversation

joshfarrant
Copy link
Contributor

@joshfarrant joshfarrant commented Feb 11, 2025

Summary

Fixes broken placeholder images by replacing remote placeholders with local.

List of notable changes:

  • Replaced placeholder-600x400.png with placeholder.png which is a 600px × 400px image with background #6B6B6B
  • Updated all instances of placeholder.com to use this new local placeholder.png
    Where we previously used many different sizes of placeholder we now only use this single 600px × 400px image. The only place where this is not quite ideal is in the Image component where we reference srcset and the <source> element. I've opted to keep those pointing at the single placeholder file, rather than creating multiple placeholders of differing resolutions.

What should reviewers focus on?

  • Check the snapshots don't contain any unintentional changes
  • Check the modified examples in the docs.

Supporting resources (related issues, external links, etc):

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • UI Changes contain new visual snapshots (generated by adding update snapshots label to the PR)
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change

Copy link

changeset-bot bot commented Feb 11, 2025

⚠️ No Changeset found

Latest commit: 0df4f16

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Feb 11, 2025

🟢 No design token changes found

Copy link
Contributor

github-actions bot commented Feb 11, 2025

🟢 No visual differences found

Our visual comparison tests did not find any differences in the UI.

@joshfarrant joshfarrant changed the title Joshfarrant/docs placeholder image Fix broken placeholder images Feb 11, 2025
@joshfarrant joshfarrant marked this pull request as ready for review February 11, 2025 14:13

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR fixes broken placeholder images by replacing remote placeholder URLs with a local static asset and updating associated alt text to reflect the new background color.

  • Replaced remote placeholder image URLs with "/brand/assets/placeholder.png" in several components, tests, and stories.
  • Updated alt text descriptions from "off-white" to "gray" to match the local image’s background color.

Changes

File Description
packages/e2e/integration-tests/fixtures/KitchenSink.tsx Updated placeholder image source and alt text in the KitchenSink fixture.
packages/react/src/Image/Image.test.tsx Replaced remote image source with local "/brand/assets/placeholder.png" in tests.
packages/react/src/Card/Card.test.tsx Updated Card image test with the local placeholder image.
packages/react/src/Footnotes/Footnotes.examples.stories.tsx Revised alt text description in the Footnotes stories.
packages/react/src/Image/Image.features.stories.tsx Changed the imported placeholder image and updated alt text in Image feature stories.
packages/react/src/Image/Image.stories.tsx Updated image source and alt text in Image stories.
packages/react/src/Bento/BentoItem.features.stories.tsx Updated the placeholder image import in BentoItem feature stories.
packages/react/src/Hero/Hero.features.stories.tsx Replaced the placeholder image in Hero stories.
packages/react/src/Card/Card.features.stories.tsx Updated the placeholder image import in Card feature stories.

Copilot reviewed 136 out of 136 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

packages/react/src/Card/Card.features.stories.tsx:3

  • Consider revising the alt text to use 'a gray' instead of 'an gray' for grammatical correctness.
      <Card.Image src={placeholderImage} alt="placeholder, blank area with an gray background color" />

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

Copy link
Collaborator

@rezrah rezrah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! thanks Josh

@rezrah rezrah merged commit 1ef253a into main Feb 17, 2025
17 checks passed
@rezrah rezrah deleted the joshfarrant/docs-placeholder-image branch February 17, 2025 11:27
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.

🐛 [BUG] - Update placeholder images in docs
2 participants