fix(fonts): use title as family name fallback for Bricks custom fonts - #164
Conversation
|
Warning Review limit reached
More reviews will be available in 53 minutes and 22 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesFont family name resolution with expanded schema fallbacks
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
b650af1 to
15e72e1
Compare
…onts Bricks' locally-served Google Fonts (downloaded via Custom Fonts) store the CSS family name only in 'title', with no separate 'font_family' or 'family' key. The previous fallback chain skipped these entries entirely, so the Bricks tab never appeared for users who added fonts that way. Extended the chain to: font_family ?? family ?? title ?? name Same fix applied to the bricks_google_fonts block for consistency. https://claude.ai/code/session_018u9uVFxgL7K6EpPjZPggKR
15e72e1 to
114e3d5
Compare
Summary
Fonts added via Bricks > Settings > Custom Fonts (including Google Fonts downloaded for local serving) store the CSS family name only in
title— no separatefont_familyorfamilykey. The previous fallback chain (font_family ?? family ?? null) skipped these entries entirely, so the Bricks tab never appeared for these users.Extended the fallback chain to:
Same fix applied to the
bricks_google_fontsblock for consistency.Changed files
includes/class-fonts-rest.php— extended family name fallback chain in both the custom and Google fonts blockshttps://claude.ai/code/session_018u9uVFxgL7K6EpPjZPggKR
Generated by Claude Code
Summary by CodeRabbit