Giter Site home page Giter Site logo

Comments (8)

DigitalGoldfish avatar DigitalGoldfish commented on August 19, 2024 1

I am not sure if you know this article already, It's the best explanation of the Layout field I could find. https://medium.com/@pierreberchtold/gatsby-cockpit-layout-field-e908f4dbd87b

from fika-gatsby-source-cockpit.

WhippetsAintDogs avatar WhippetsAintDogs commented on August 19, 2024

Hi @loremipson , I haven't tried the layout field myself. So naturally, it's not actually supported by the plugin. I'll have a look a this soon, stay tuned (any PR in that regard is also welcome) ☺

from fika-gatsby-source-cockpit.

patesson avatar patesson commented on August 19, 2024

Part of Layout appears to come through already. I haven't tried all the components, but the text based ones work already, returning "'id', 'class', and 'text'. Images return the same but these values don't make sense for the, and I would image any custom components would have similar issues

from fika-gatsby-source-cockpit.

loremipson avatar loremipson commented on August 19, 2024

Would be great to get that layout parser in this plugin, as it seems gatsby-plugin-cockpit progress has ceased for now.

from fika-gatsby-source-cockpit.

DigitalGoldfish avatar DigitalGoldfish commented on August 19, 2024

It seems to be a pattern with gatsby plugins for cockpit that they get abondoned after a short time gatsby-plugin-cockpit was the third I used and that ceased to be developed. I do hope this one survives ...

Back to the layout field ... as @POGRaphy said, parts of the layout fields are coming through already but the way they are currently added to the graphql schema is a dead end; it wouldn't be possible to write GraphQL queries that match every possible combination that can be in the inferred schema. gatsby-plugin-cockpit uses a GraphQLJson field to return the whole object without gatsby trying to infer a schema for it.
I had a look at the code today and I believe I can migrate it to this plugin without too much effort. I hope to find some time to create a PR over the weekend.

from fika-gatsby-source-cockpit.

DigitalGoldfish avatar DigitalGoldfish commented on August 19, 2024

As promised - experimental support for the layout field type can be found in #14. It would be awesome if one of you can spend some time and test it.

from fika-gatsby-source-cockpit.

WhippetsAintDogs avatar WhippetsAintDogs commented on August 19, 2024

Support for Layout and Layout-grid added in version 1.0.14+. Closing this issue.

from fika-gatsby-source-cockpit.

WhippetsAintDogs avatar WhippetsAintDogs commented on August 19, 2024

Reopened this issue in order to add support for images and assets nested in Layout and Layout-grid field.

from fika-gatsby-source-cockpit.

Related Issues (20)

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.