Skip to content

Conversation

@shinesoftware
Copy link

  • Implemented methods in Turnstile block to check if Turnstile is enabled, retrieve site key, and manage form settings.
  • Enhanced turnstile.phtml to utilize new block methods for configuration and added fallback for themes without Knockout.js.
  • Introduced fallback.js to handle rendering when Knockout.js is unavailable.
  • Updated CSS for improved styling of Turnstile elements.
  • Included fallback.js in the layout for frontend integration.

- Implemented methods in Turnstile block to check if Turnstile is enabled, retrieve site key, and manage form settings.
- Enhanced turnstile.phtml to utilize new block methods for configuration and added fallback for themes without Knockout.js.
- Introduced fallback.js to handle rendering when Knockout.js is unavailable.
- Updated CSS for improved styling of Turnstile elements.
- Included fallback.js in the layout for frontend integration.
@shinesoftware
Copy link
Author

Please merge the changes so I can use them into our project, thanks for your help!

Shine Software added 7 commits November 24, 2025 20:39
- Added storefront setting for selecting widget rendering mode (Knockout vs Hyvä/Alpine fallback).
- Ensured only one renderer executes at a time to prevent Cloudflare "sitekey object" errors.
- Introduced dedicated fallback container class (`cf-turnstile-manual`) to prevent auto-rendering on Hyvä widgets.
- Enhanced frontend/admin CSS and JS to respect the selected rendering mode.
- Changed package name from shinesoftware/magento-cloudflare-turnstile to pixelopen/cloudflare-turnstile-bundle.
- Refactored error handling in component.js to ensure the error message is displayed only when the site key is missing.
- Cleaned up formatting in turnstile.phtml for better readability.
- Updated the getValue method in component.js to utilize optional chaining when checking if the value is an observable, enhancing code robustness.
- Adjusted CSS rules for `.cf-turnstile-manual` and `.cloudflare-turnstile .cf-turnstile` to improve layout consistency.
- Ensured proper margin and minimum height settings for better visual alignment in both admin and frontend styles.
@sonarqubecloud
Copy link

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant