-
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-source-wordpress): Add keepMediaDetails #15862
Conversation
@gatsbyjs/learning is tagged on this, but more appropriate for @gatsbyjs/core -- will leave for y'all! |
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.
You seem to have pushed built files in src/gatsby-node.js
Could you please push the src (without transpilation)? Also, it would be nice to add a test for this new option.
Closing this for now since the changes are hard to grok with transpiled code Let's re open after pushing untranspiled code and take it from there! |
I just committed the changes to my fork, sorry about that! |
This is done! |
@billyjacoby No problem. Thanks for fixing! Could you please fix conflicts and add a test for the new option! Otherwise, looks good! 🙌🏼 |
Conflicts are resolved. As for adding tests, "it's a bit tricky to mock as it needs to access to the store/cache + would download file.." according to the existing code base. To be honest I'm not sure how I'd go about mocking all of that... |
Could you please push the source so I can review this?
Just took a look. Fair enough. Since this is fairly simple (only 'keeps' some keys that would otherwise be deleted) I think we can skip testing this till we figure out how to better mock the download and store etc |
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.
Left two comments!
I totally just forgot to push after making the changes locally last night. Should be good to go now. |
@billyjacoby Thanks! What do you think about renaming the option? |
I'm totally fine with it. That was just the most concise name I could think of, but naming is certainly not my strong suite😅 ... |
@billyjacoby Oops, I hit the wrong button hah No worries. Naming is hard! Go ahead and make the change then and we'll get this shipped 💃 |
Done! I liked your name better than mine, so thanks for that! 😬 |
I'll add that in a follow up! Merging this in now |
@@ -138,7 +142,7 @@ exports.sourceNodes = async ( | |||
touchNode, | |||
getNode, | |||
_auth, | |||
reporter, |
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.
We still should pass reporter
to normalize.downloadMediaFiles
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.
Fixing that in #16670
Not published yet anyway
Renamed this to Sorry for the back and forth @billyjacoby |
Published in |
Description
This will enable users to toggle sourceThumbnails in order to decide whether or not thumbnail info is downloaded.
I needed this in order to build an image carousel that didn't warrant the highest quality photos to speed up site load times.
Related Issues
Fixes #6509