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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get loadingStrategy value from netlify.toml inputs, default to 'lazy' if not provided #98

Conversation

gshel
Copy link
Contributor

@gshel gshel commented Nov 11, 2023

Description

loadingStrategy was not being read from the netlify.toml; this PR gets the value from the netlify.toml and if it doesn't exist, it defaults to lazy.

Issue Ticket Number

Fixes #97

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • I have followed the contributing guidelines of this project as mentioned in CONTRIBUTING.md
  • I have created an issue ticket for this PR
  • I have checked to ensure there aren't other open Pull Requests for the same update/change?
  • I have performed a self-review of my own code
  • I have run tests locally to ensure they all pass
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes needed to the documentation
Copy link

netlify bot commented Nov 11, 2023

Deploy Preview for netlify-plugin-cloudinary ready!

Name Link
🔨 Latest commit 3b94bb8
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-cloudinary/deploys/65526ef6813f7200081ae618
😎 Deploy Preview https://deploy-preview-98--netlify-plugin-cloudinary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@gshel
Copy link
Contributor Author

gshel commented Nov 12, 2023

Looks like the tests may need to be updated as well, will continue working on it tomorrow or Monday.

…racters from paths

* Fix tests breaking on Windows due to illegal character > in paths
* Windows path sep is a '\' which results in a cldAssetUrl containing URL encoding, causing tests to fail
@colbyfayock
Copy link
Collaborator

thanks for fixing this 😅 im not sure how i never noticed it not working before, but glad you were able to get it set up working right!

i only really have a question on the context of the posix fix, but it seems like it's to help make the project and tests more reliable from an environment perspective?

…cted value for img loading attribute

* Remove updateHtmlImagesToCloudinary() test because the default value of loadingStrategy is determined when the netlify.toml inputs are received, not when this function is called
@colbyfayock
Copy link
Collaborator

great work here @gshel - thank you for the contribution!

@colbyfayock colbyfayock merged commit 8d68b05 into cloudinary-community:main Nov 13, 2023
8 checks passed
@colbyfayock
Copy link
Collaborator

@all-contributors please add @gshel for code

Copy link
Contributor

@colbyfayock

I've put up a pull request to add @gshel! 🎉

github-actions bot pushed a commit that referenced this pull request Nov 13, 2023
# [1.15.0](v1.14.0...v1.15.0) (2023-11-13)

### Features

* Get loadingStrategy value from netlify.toml inputs, default to 'lazy' if not provided ([#98](#98)) ([8d68b05](8d68b05))
Copy link

🎉 This PR is included in version 1.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

colbyfayock pushed a commit that referenced this pull request Nov 13, 2023
Adds @gshel as a contributor for code.

This was requested by colbyfayock [in this
comment](#98 (comment))

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
@colbyfayock
Copy link
Collaborator

FYI 1.15.0 is available on Netlify!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants