GithubHelp home page GithubHelp logo

rshackleton / gatsby-packages Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 1.19 MB

A series of Gatsby packages.

Home Page: https://gatsby-packages.netlify.com/

JavaScript 27.04% TypeScript 72.96%
gatsby gatsby-plugin gatsby-site gatsby-theme gatsby-transformer kentico-kontent

gatsby-packages's People

Contributors

github-actions[bot] avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

gatsby-packages's Issues

Base64 image is requested even when not used in query

Describe the bug
The base64 image is always requested, even when not included in the query. This is a pointless performance overhead.

Expected behavior
The base64 image should only be requested if the field is included in the query.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Allow control over fluid image sizes

Is your feature request related to a problem? Please describe.
Currently the fluid resolver generates a series of images at 0.25, 0.5, 1, 1.5, 2 times the requested maxWidth value.

This covers many scenarios but some use cases would benefit from a finer control to allow specific sizes to be generated.

Describe the solution you'd like
Support the srcSetBreakpoints attribute in the same manner as the gatsby-sharp-plugin does. This will be an array of widths at which the original image shall be resized. This will form the bases of the srcset attribute.

There was an error in your GraphQL query: ETIMEDOUT

I'm using this with the latest version of gatsby-source-kontent (v5.0.0) which has made a few breaking changes to fix a bug (kontent-ai/gatsby-packages#110)

Whenever I try to run fluid or fixed I get an error: ETIMEDOUT. I'm not sure if it is related to the new kontent source changes or something else.

background_image {
  value {
    url
    fluid(maxWidth: 1920) {
       ...KontentAssetFluid
     }
  }
}

Not working at all

Describe the bug
This plugin doesn't seem to do anything.

The fluid and fixed properties fail to appear in GraphiQL and if I try to use them in my project I get Cannot query field "fluid" on type "kontent_item_asset_element".

To Reproduce

My plugins array in gatsby-config.js:

  plugins: [
    `gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    {
      resolve: '@kentico/gatsby-source-kontent',
      options: {
        projectId: process.env.KONTENT_PROJECT_ID,
        globalQueryConfig: {
          usePreviewMode: !!process.env.KONTENT_PREVIEW_KEY
        },
        previewApiKey: process.env.KONTENT_PREVIEW_KEY,
        languageCodenames: [
          'en-GB', 'es-ES'
        ],
      }
    },
    {
      resolve: `@rshackleton/gatsby-transformer-kontent-image`,
      options: {},
    },
  ],

Expected behavior
The plugin should work.

Packages

  • "@kentico/gatsby-source-kontent": "^6.0.0",
  • "@rshackleton/gatsby-transformer-kontent-image": "^0.1.0",
  • "gatsby-image": "^2.4.3",
  • "gatsby-plugin-sharp": "^2.6.3",
  • "gatsby-transformer-sharp": "^2.5.2",

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency @types/fs-extra to v8.1.2
  • Update dependency axios to ^0.27.0
  • Update actions/checkout action to v3
  • Update actions/setup-node action to v3
  • Update dependency @kentico/gatsby-source-kontent to v8
  • Update dependency @types/node to v18
  • Update dependency axios to v1
  • Update dependency dotenv to v16
  • Update dependency fs-extra to v11 (fs-extra, @types/fs-extra)
  • Update dependency typescript to v5
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/main.yml
  • actions/checkout v2
  • actions/setup-node v1.4.6
  • actions/checkout v2
  • actions/setup-node v1.4.6
  • actions/checkout v2
  • actions/setup-node v1.4.6
.github/workflows/validate.yml
  • actions/checkout v2
  • actions/setup-node v1.4.6
npm
package.json
  • @changesets/cli 2.23.0
  • lerna 3.22.1
  • npm-run-all 4.1.5
packages/gatsby-theme-kontent/package.json
  • @kentico/gatsby-source-kontent ^6.0.1
  • gatsby ^2.19.12
packages/gatsby-transformer-kontent-image/package.json
  • @kentico/kontent-delivery ^8.2.0
  • @types/fs-extra ^8.0.1
  • axios ^0.24.0
  • fs-extra ^8.1.0
  • gatsby-plugin-sharp ^2.14.3
  • gatsby-source-filesystem ^2.11.1
  • @types/jest 24.9.1
  • @types/node 13.13.52
  • @typescript-eslint/eslint-plugin 2.34.0
  • @typescript-eslint/parser 2.34.0
  • cross-env 6.0.3
  • eslint 6.8.0
  • gatsby 2.32.13
  • jest 24.9.0
  • prettier 1.19.1
  • ts-jest 24.3.0
  • typescript 3.9.10
  • @kentico/gatsby-source-kontent ^6.0.1 || ^6.0.1
  • gatsby ^2.19.12
site/package.json
  • dotenv 8.6.0
  • gatsby 2.32.13
  • gatsby-image 2.11.0
  • react 16.14.0
  • react-dom 16.14.0

  • Check this box to trigger a request for Renovate to run again on this repository

Update axios

Describe the bug

There is a security vulnerability in Axios (

).

Expected behavior

Upgrade axios to 0.21.1 or later.

Additional context

I am currently fixing kontent-ai/gatsby-packages#168 and it would be great to have it fixed in used packages too (I have a sample demo in the repository using transformed image).

Allow sizes value to be overridden in query

Is your feature request related to a problem? Please describe.
The sizes attribute is used to determine which image size should be used at various breakpoints.

Currently the plugin generates a standard size value as per the gatsby-sharp-plugin which is:

sizes="(max-width: ${maxWidth}px) 100vw, ${args.maxWidth}px"

Describe the solution you'd like
The plugin should allow a sizes parameter in the GraphQL query to override this default value and therefore provide more control over which size images are used at different screen sizes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.