-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat(gatsby-www-components): create package and add some components (#19036) #20054
feat(gatsby-www-components): create package and add some components (#19036) #20054
Conversation
}} | ||
key={item} | ||
> | ||
<Link to={`www.youtube.com`}>{item}</Link> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is different to the current https://github.com/gatsbyjs/gatsby/blob/master/www/src/components/horizontal-nav-list.js
<Link to={`www.youtube.com`}>{item}</Link> | |
<Link to={`${slug.slice(0, -1)}#${item.toLowerCase()}`}>{item}</Link> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also the Link
and mediaQueries
import is a little bit different from the source file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is different to the current https://github.com/gatsbyjs/gatsby/blob/master/www/src/components/horizontal-nav-list.js
Sorry, I used that for debugging and forgot to change it back. It is fixed now.
also the
Link
andmediaQueries
import is a little bit different from the source file
I changed it because I found copying whole gatsby-plugin-theme-ui
a little bit of an overkill. I changed import for link, because in gatsby-link
README.md it says not to import from there anymore and use gatsby
package instead.
link: /docs/cheat-sheet/ | ||
- title: Glossary | ||
link: /docs/glossary/ | ||
items: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
f12878a
to
8708bce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this work!
In addition to the inline changes requested, could you remove the components added here from www
and exchange them with the components in this package? This would be a good way to test that the changes actually work.
As for publishing, I'm not sure what's the best way to do that. @fk, what was the process for gatsby-design-tokens
?
@@ -0,0 +1 @@ | |||
/*.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you adding all js files to the gitignore? Was this something you added in debugging that got accidentally merged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember why it is there but it seems unnecessary, so I removed it.
@@ -0,0 +1,52 @@ | |||
import React from "react" | |||
|
|||
import docsHierarchy from "../data/sidebars/doc-links.yaml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files are used by more components than just this (see gatsby-node
and item-list
). It doesn’t make sense to move these YAML files to a "components" file when they're more like data integral to the site itself. I would leave the guide-list
component out of this initial PR until we figure out what to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I removed them from PR
To ask @gatsbyjs/core for help :D <3 — I think @sidharthachatterjee published for me. |
Ok, but my question is how should I use this package if it is not published yet. Should I use it as a local package? That is what I did for now, but it is most likely not working, as there are some peerDependencies in this package. |
8708bce
to
b15b82b
Compare
bdd933e
to
0abeac2
Compare
0abeac2
to
ac5335e
Compare
ac5335e
to
ef14f01
Compare
So it turns out that a lot of these components are already made globally available through gatsby-plugin-theme-ui. This means that we don't actually have to put them in another package -- we just need to add them to the list of exported components. I've updated the original issue (#19036) to reflect the change in plans. As such, I'm going to close this for now to avoid confusion. @Qovaros985 thank you for your work, and would you like to take a shot of the updated issue? (It'll probably be easier than figuring out how to publish a package) |
Description
First step in works on #19036. In this PR I created a new package called
gatsby-www-components
and added some of the mentioned components to this package.Questions
2.1. If yes, who could I contact about this process?
2.2. If no, how should it be used in
www
folder?