Giter Club home page Giter Club logo

Comments (4)

CryogenicPlanet avatar CryogenicPlanet commented on May 18, 2024 1

Hey happy to accept a PR for this!

I think there would be some UX work needed to accommodate that toggle so would recommend posting them here before making the PR

from socialify.

louisefindlay23 avatar louisefindlay23 commented on May 18, 2024 1

Thanks, @CryogenicPlanet. Sounds great. Sure, would be happy to post screenshots of the example UI.

I see you made this project as part of the MLH Fellowship. Awesome 🚀. I've just completed the Pre-Fellowship and we used Socialify for the header image of our repo. So easy to generate and work with.

I've never used TypeScript or GraphQL before so I've looked at the code and I think I'd need to update repoQuery.ts with a new pullRequests with a state of closed and add that to getOptionalConfig of configHelper.ts? Would that be along the right lines?

Thanks 😊

from socialify.

CryogenicPlanet avatar CryogenicPlanet commented on May 18, 2024

To an extent, you want to be able to get the state of both open and closed issues/prs separately so we can keep the default as open.

Feel free to play with the graphql explorer for GitHub here https://docs.github.com/en/graphql/overview/explorer. It makes it far easier to try things out.

So getOptionalConfig would not be enough here, that just get the default configuration. You have to change the mergeConfig

You want to create a new parameter inside the optional types like description has editable to decide if it is only open (default) or should include closed too. This can either be one toggle for both PRs and Issues or a different toggle for both, really depends on the UI

description: {
state: false,
editable: true,
value: repository.description || ''

You will have to add it to the QueryType and ConfigType too

type QueryType = {
font: Font
theme: Theme
pattern: Pattern
language: string
stargazers: string
forks: string
issues: string
pulls: string
description: string
descriptionEditable: string
owner: string
logo: string
_owner: string
_name: string
}

Typescript should do its job and tell you everywhere QueryType is used and will have to change it to those places.

Happy to answer any other questions! Also don't worry about not knowing Graphql or Typescript, I didn't know it when we made this and barely knew typescript.

from socialify.

wei avatar wei commented on May 18, 2024

Closing due to inactivity.

from socialify.

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.