What's Changed
-
Stats Counter Fix (Issue #167):
- Fixed Alpine.js console errors on CMS pages with stats blocks
- Replaced
x-intersectdirective (requires plugin) with native Intersection Observer API - No longer requires
@alpinejs/intersectplugin installation - Counter animation works out-of-the-box without additional dependencies
-
Hero Block Button Fix (Issue #168):
- Fixed Hero block button not appearing for non-external link types (Blog Home, Category, CMS Page)
- Root Cause:
LinkResolver::resolve()returnednullwhen Laravel routes were unavailable (e.g., in FilamentPHP admin panel context) - Solution: Enhanced
LinkResolverto construct URLs manually using configuration whenroute()helper fails - Improvements:
resolveBlogLink(): Builds URLs usingblogr.route.prefix,blogr.route.homepage, andblogr.locales.*configresolveCategoryLink(): Builds category URLs with proper locale and prefix handlingresolveCmsPageLink(): Builds CMS page URLs with support for homepage detection and prefix
- Affected Link Types: All types now work consistently (External URL, Blog Home, Category, CMS Page)
- Files Modified:
src/Helpers/LinkResolver.php: Added manual URL construction fallbacks for all link typesresources/views/components/blocks/hero.blade.php: Button displays when bothcta_textand resolved URL are present
- Tests Added: 7 comprehensive tests covering all link types and edge cases (including invalid references)
- Impact: Hero block buttons now consistently visible in both frontend and FilamentPHP admin panel, improving user experience during content editing
Full Changelog: v0.15.5...v0.15.6