-
Notifications
You must be signed in to change notification settings - Fork 123
feat(sqip): implement sqip && fix mobile layout #13
Conversation
package.json
Outdated
@@ -7,22 +7,27 @@ | |||
"url": "https://github.com/contentful-userland/gatsby-contentful-starter/issues" | |||
}, | |||
"dependencies": { | |||
"contentful-import": "^6.2.0", | |||
"gatsby-link": "^1.6.34", | |||
"axios": "^0.18.0", |
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 dependency will be gone with gatsbyjs/gatsby#5469
package.json
Outdated
"gatsby-transformer-remark": "^1.7.32", | ||
"inquirer": "^5.1.0", | ||
"lodash": "^4.17.4" | ||
"gatsby-plugin-sharp": "^1.6.44", |
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 dependency will be gone with gatsbyjs/gatsby#5469
@@ -7,22 +7,27 @@ | |||
"url": "https://github.com/contentful-userland/gatsby-contentful-starter/issues" | |||
}, | |||
"dependencies": { | |||
"contentful-import": "^6.2.0", |
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.
@axe312ger Why did you drop the import? That's part of the setup flow? :)
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.
that was on accident 🙈
good catch 👀
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.
Can we use contentful-cli
instead of contentful-import
now that the latter is deprecated?
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.
They should use the contentful-import
directly here because it is used as node library
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.
makes sense! thanks!
src/components/hero.module.css
Outdated
height: 100%; | ||
width: auto; | ||
margin: 0 auto; | ||
height: 61.8vh; |
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.
what's this number? pi * 👍🏻 ?
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 googled golden ratio in percentage
, this came out and it looked nice. So thats why I did choose this value 🙈
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.
Haha... Can you then add this as a comment? :D
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 think this is great but bringing this in additionally I feel like we should have a place in the docs describing what is included in the starter? There's going more and more magic in which can be quite confusing. :)
What do you think?
Alright, will add some docs :) |
Docs added, comment added, rebased. Ready for review :) |
Any update on this? |
@axe312ger I just tried your changes, and it looks very cool! One problem, though, is starting time: now, instead of 3 seconds it is 65. Can we make this part (with sqip) optional? What do you think? Thanks! |
Hey there, optional could be nasty since it requires different config for the gatsby-image element. Also, yes it takes more time to run in the first time but subsequent runs will use the already generated picture. 63 seconds is really slow, what kind of machine did you use? Best, |
Ah, I see. I have MBP 2017, 3,1 GHz Intel Core i7 and 16GB DDR3, so it should be good. I've just reinstalled all packages and it is 3 seconds again! Super weird, since I think I did before as well, but if it is for you the same (no changes in time) then I think all good. |
I am wondering if this gives first time Contentful/Gatsby users the impression it is slow. Maybe this isn't that great idea and we should maybe switch to traced SVG output since this is supported now in Gatsby in combination with Contentful. What do you think? |
Actually, I just tried it again, and it seems that fast rebuilding (3 seconds) is only if everything is in cache, so in case I do the following:
It takes ~50 seconds now (weird). Also, it does not really run for me (graphQL server works, but not usual http://localhost:8000), and also |
Hmm thats very weird, looks like a Gatsby problem to me, for some reason it cant fine some files o.O With the 50 seconds: Thats normal, primitive is a random algorithm so it might take some more or less time. But the settings here are maybe to crazy, it shouldn't take that long on your machine. 🤔 |
@axe312ger I have to say I agree with @Bloomca here, that 50s might give users the impression that this is the overall development experience. Any chance to only get the CSS fixes in? 😊 |
updates all dependencies and fully implements sqip previews