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(FeaturedImage): prevent simultaneous width and fill props usage #2009

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

whoami-pwd
Copy link
Contributor

Description

This PR fixes the issue where the FeaturedImage component from the example was experiencing conflicts between width and fill properties. The error occurred when both properties were being passed simultaneously.

Changes made:

  • Prevented simultaneous usage of width and fill properties
  • Added proper property validation
  • Updated the layout handling logic to ensure these props are mutually exclusive

Testing

Local Testing:

npm run dev

  • Navigate to pages with FeaturedImage components
  • Verify images render correctly with 'fill' layout
  • Verify images render correctly with explicit width/height

Screenshots

Screenshot 2024-12-09 at 10 40 46

@whoami-pwd whoami-pwd requested a review from a team as a code owner December 12, 2024 16:57
Copy link

changeset-bot bot commented Dec 12, 2024

⚠️ No Changeset found

Latest commit: ccdb838

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

📦 Next.js Bundle Analysis for @faustwp/getting-started-example

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 260.08 KB (🟡 +20 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

@theodesp
Copy link
Member

Awesome!

@whoami-pwd whoami-pwd merged commit 6cf7643 into canary Dec 17, 2024
18 checks passed
@whoami-pwd whoami-pwd deleted the fix/featured-image-width-fill-conflict branch December 17, 2024 11:38
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