feat(edge-apps-library): add default Screenly logo fallback to brand-logo#737
feat(edge-apps-library): add default Screenly logo fallback to brand-logo#737nicomiguelino wants to merge 3 commits intomasterfrom
Conversation
…logo - Copy screenly.svg from blueprint into edge-apps-library assets - Return default logo from setupBrandingLogo() when no logo is configured or all fetches fail - Simplify setupBranding() to always set logoUrl Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PR Reviewer Guide 🔍(Review updated until commit e3a6676)Here are some key observations to aid the review process:
|
|
Persistent review updated to latest commit 3cfa7ed |
PR Code Suggestions ✨Latest suggestions up to 3cfa7ed
Previous suggestionsSuggestions up to commit 3cfa7ed
|
There was a problem hiding this comment.
Pull request overview
Adds a built-in Screenly logo asset and updates branding utilities so brand-logo can fall back to a default logo when no custom logos are configured or when logo fetch attempts fail.
Changes:
- Add
screenly.svgto the library’s image assets. - Update
setupBrandingLogo()to return the default logo when no logo is configured or when all fetch attempts fail. - Simplify
setupBranding()to always return a definedlogoUrl.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| edge-apps/edge-apps-library/src/utils/theme.ts | Imports the default SVG and updates branding logo fallback + return shape. |
| edge-apps/edge-apps-library/src/assets/images/screenly.svg | Adds the default Screenly SVG logo asset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix `!logoUrl` guard to `!fallbackUrl` in `setupBrandingLogo` to correctly detect unconfigured logos (logoUrl is always non-empty due to template literal construction) - Update JSDoc to accurately reflect default logo fallback behavior - Add tests for branding logo fallback cases (no logos configured, all fetches fail) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a built-in Screenly logo asset and uses it as a guaranteed fallback for branding logo resolution, so consumers (notably the brand-logo component) always have a usable logoUrl.
Changes:
- Added
screenly.svgto library assets and imported it as the default logo fallback. - Updated
setupBrandingLogo()to return the default logo when no custom logo is configured or when all fetch attempts fail. - Simplified
setupBranding()to always return a definedlogoUrl, and added unit tests for the new fallback behavior.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
edge-apps/edge-apps-library/src/utils/theme.ts |
Imports the default Screenly logo and updates branding-logo fallback behavior / return shape. |
edge-apps/edge-apps-library/src/utils/theme.test.ts |
Adds coverage for default-logo fallback cases in setupBrandingLogo(). |
edge-apps/edge-apps-library/src/assets/images/screenly.svg |
New default logo asset used as the fallback branding logo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| fallbackUrl = darkLogo || lightLogo || '' | ||
| } | ||
|
|
||
| // Return early if logoUrl is empty | ||
| if (!logoUrl) return '' | ||
| // Return default logo if no logo is configured | ||
| if (!fallbackUrl) return defaultLogoUrl |
- Treat any non-dark theme value as light to avoid skipping logo config - Resolve primary/secondary logo in a single conditional instead of if/else if branches Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Persistent review updated to latest commit e3a6676 |
PR Code Suggestions ✨No code suggestions found for the PR. |
User description
Summary
screenly.svgtoedge-apps-libraryassetssetupBrandingLogo()whenscreenly_logo_light/screenly_logo_darkare not set or all fetch attempts failsetupBranding()sincelogoUrlis now always definedPR Type
Bug fix, Enhancement, Tests
Description
Add default Screenly logo fallback
Normalize theme-based logo selection
Always return
logoUrlin brandingAdd fallback logo behavior tests
Diagram Walkthrough
File Walkthrough
theme.ts
Default logo fallback for branding setupedge-apps/edge-apps-library/src/utils/theme.ts
screenly.svgas default logologoUrlfromsetupBranding()theme.test.ts
Tests for branding logo fallback behavioredge-apps/edge-apps-library/src/utils/theme.test.ts
setupBrandingLogoand bundled default logofetchfailure to verify default fallbackfetchbetween tests