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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gatsby-plugin-prop-shop #669

Closed
wants to merge 1 commit into from

Conversation

PaulieScanlon
Copy link

Hey all.

Apologies in advance if this is an inappropriate PR 馃槵

I've been developing a Gatsby plugin called gatsby-plugin-prop-shop which provides an holistic view of all PropTypes defined in a Gatsby project.

You can specify using the options where you wish to source .js or .tsx files from and once you've configured the plugin you can spin up your project using the usual gatsby develop or gatsby build methods and then navigate to eg: http://localhost:8000/prop-shop/ to see all the PropTypes and descriptions for the specified source directories.

There are a number of search / filter options available in the PropShop UI which can be used to investigate prop and files.

I've added prop-types to the components package along with some descriptions to the Embed component so you can get a better understanding of how the plugin works.

I appreciate a lot of the theme-ui components are styled html and by spreading props allow users to set attributes as they normally would in html world but there are one or two custom props which might benefit from PropTypes / descriptions.

Please don't feel like this PR should be merged and especially as i'm still in the early stages of development but i'd love your feedback all the same.

Thanks in advance

Paul

@PaulieScanlon PaulieScanlon changed the title add gatsby-plugin-prop-shop Add gatsby-plugin-prop-shop Feb 15, 2020
@jxnblk
Copy link
Member

jxnblk commented Feb 17, 2020

Thanks! This is a really cool idea! If this will work once we have the components package moved over to TS, I think it might be worth waiting for that rather than using prop-types in the interim, if you're okay letting this PR sit idle for a bit

@PaulieScanlon
Copy link
Author

PaulieScanlon commented Feb 18, 2020

Hey @jxnblk yeah no worries at all! I鈥檓 pretty sure it鈥檒l continue to work with TS.

I've just seen the issue about converting packages to TS... i've commented and would like to take a look at converting components

@PaulieScanlon
Copy link
Author

Oh and I wrote a little blog post about it if you have a spare 3 mins.

https://paulie.dev/posts/2020/02/prop-shop/

@lachlanjc lachlanjc added the affects-docs Changes affect documentation, but not only documentation label Dec 3, 2020
@lachlanjc
Copy link
Member

Thanks a bunch for the PR鈥攈owever as Brent said we鈥檙e working on migrating these components over to TypeScript instead of using the prop-types package. There鈥檚 also the issue of just how many props most of these components accept鈥攖he whitespace & color props from Styled System, a handful of custom ones, variant/sx, then spread the remainders. There鈥檚 also the issue of what values are genuinely useful to demonstrate & how those are generated automatically. Therefore we鈥檙e not planning to implement this.

@lachlanjc lachlanjc closed this Dec 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-docs Changes affect documentation, but not only documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants