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

Contentful: respect gatsby-plugin-image defaults and extend tests #33536

Merged
merged 5 commits into from
May 23, 2022

Conversation

axe312ger
Copy link
Collaborator

@axe312ger axe312ger commented Oct 14, 2021

Reported via #31856 by @njbmartin, rebased version of #32802 based on #33528.

With these changes, we will respect the defaults of gatsby-plugin-image. Additionally, we will have proper tests for all placeholders.

  • respect global defaults
  • respect defaults by file type
  • respect traced svg defaults
  • respect blurred placeholder defaults
  • write and extend tests

@axe312ger axe312ger added the topic: source-contentful Related to Gatsby's integration with Contentful label Oct 14, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 14, 2021
@LekoArts LekoArts removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 22, 2021
@mwskwong
Copy link

Bump

Base automatically changed from refactor/contentful-remove-gatsby-image-support to master November 8, 2021 10:07
@axe312ger axe312ger closed this Nov 11, 2021
@axe312ger axe312ger force-pushed the fix/contentful-respect-gatsby-plugin-image-defaults branch from caa6428 to b0ec8ca Compare November 11, 2021 11:26
@axe312ger axe312ger reopened this Nov 11, 2021
@axe312ger axe312ger force-pushed the fix/contentful-respect-gatsby-plugin-image-defaults branch from 861a735 to 4582656 Compare November 12, 2021 10:38
@axe312ger axe312ger marked this pull request as ready for review November 12, 2021 11:52
@axe312ger axe312ger added the status: needs core review Currently awaiting review from Core team member label Dec 1, 2021
@axe312ger axe312ger force-pushed the fix/contentful-respect-gatsby-plugin-image-defaults branch 2 times, most recently from b620934 to 424277c Compare January 14, 2022 13:03
@wardpeet wardpeet added bot: merge on green Gatsbot will merge these PRs automatically when all tests passes status: needs core review Currently awaiting review from Core team member and removed status: needs core review Currently awaiting review from Core team member labels Jan 28, 2022
Comment on lines 263 to 266
const {
getPluginOptions,
doMergeDefaults,
} = require(`gatsby-plugin-sharp/plugin-options`)
Copy link
Contributor

Choose a reason for hiding this comment

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

We can't do this, it breaks PNP support

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

switched to await import. This should do the trick?

@wardpeet wardpeet removed the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Jan 28, 2022
Comment on lines +263 to +268
const { getPluginOptions, doMergeDefaults } = await import(
`gatsby-plugin-sharp/plugin-options`
)
Copy link
Contributor

Choose a reason for hiding this comment

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

This still breaks PNP support :D you can't import if it's not a peerdependency

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

ok my mistake

@axe312ger axe312ger force-pushed the fix/contentful-respect-gatsby-plugin-image-defaults branch from 41b59c9 to 13fb9bc Compare April 8, 2022 09:49
@axe312ger axe312ger removed the status: needs core review Currently awaiting review from Core team member label May 20, 2022
@axe312ger axe312ger added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label May 20, 2022
@wardpeet wardpeet merged commit 2fc7732 into master May 23, 2022
@wardpeet wardpeet deleted the fix/contentful-respect-gatsby-plugin-image-defaults branch May 23, 2022 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes topic: source-contentful Related to Gatsby's integration with Contentful
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants