feat(asset-metadata): migrate and redesign asset metadata app#776
feat(asset-metadata): migrate and redesign asset metadata app#776nicomiguelino wants to merge 6 commits intomasterfrom
Conversation
…a-old - Preserve existing Vue/TypeScript implementation as reference - Free up asset-metadata directory for redesigned app
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
- Add new asset-metadata Edge App using edge-app-template - Implement glassmorphic card layout for screen metadata display - Support landscape and portrait orientations via CSS Grid - Use @screenly/edge-apps utilities for theme, branding, and metadata - Copy screenly.yml and screenly_qc.yml from asset-metadata-old - Bump @screenly/edge-apps to 0.0.17 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add `<app-header>` to index.html above the grid - Set `flex-direction: column` on `#app` so header stacks on top - Replace `height: 100%` with `flex: 1` on `.grid-container` Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add background image with dark overlay via `body::before` - Replace opaque card background with glassmorphic gradient and blur - Set white text colors on card values, labels, and chips - Remove "Powered by Screenly" text from logo card - Set `app-header` text color to white Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR migrates the Asset Metadata edge app to a vanilla HTML/CSS/TypeScript implementation with a responsive card-based layout, while preserving the legacy Vue version in a separate asset-metadata-old/ folder.
Changes:
- Replaced the Vue/Pinia UI with a static HTML shell + DOM-driven rendering for Screenly metadata.
- Added new responsive styling and Playwright-based screenshot generation.
- Archived the previous Vue implementation (including its tooling/config/tests) under
edge-apps/asset-metadata-old/.
Reviewed changes
Copilot reviewed 16 out of 48 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| edge-apps/asset-metadata/tsconfig.json | Aligns TS config with shared edge-apps defaults for the new app. |
| edge-apps/asset-metadata/static/images/bg.webp | Background asset for the redesigned UI. |
| edge-apps/asset-metadata/src/main.ts | New DOM-based bootstrap: branding/theme setup + metadata rendering. |
| edge-apps/asset-metadata/src/css/style.css | New responsive card/grid styling for the redesigned UI. |
| edge-apps/asset-metadata/screenshots/800x480.webp | Updated/added marketing screenshot for this resolution. |
| edge-apps/asset-metadata/screenshots/720x1280.webp | Updated/added marketing screenshot for this resolution. |
| edge-apps/asset-metadata/screenshots/480x800.webp | Updated/added marketing screenshot for this resolution. |
| edge-apps/asset-metadata/screenshots/4096x2160.webp | Updated/added marketing screenshot for this resolution. |
| edge-apps/asset-metadata/screenshots/3840x2160.webp | Updated/added marketing screenshot for this resolution. |
| edge-apps/asset-metadata/screenshots/2160x4096.webp | Updated/added marketing screenshot for this resolution. |
| edge-apps/asset-metadata/screenshots/2160x3840.webp | Updated/added marketing screenshot for this resolution. |
| edge-apps/asset-metadata/screenshots/1920x1080.webp | Updated/added marketing screenshot for this resolution. |
| edge-apps/asset-metadata/screenshots/1280x720.webp | Updated/added marketing screenshot for this resolution. |
| edge-apps/asset-metadata/screenshots/1080x1920.webp | Updated/added marketing screenshot for this resolution. |
| edge-apps/asset-metadata/README.md | Updates documentation to match the new build/dev/test flows. |
| edge-apps/asset-metadata/package.json | Switches scripts/deps to the edge-apps-scripts workflow and new app versioning. |
| edge-apps/asset-metadata/index.html | New static HTML layout (auto-scaler + metadata cards). |
| edge-apps/asset-metadata/e2e/screenshots.spec.ts | Adds Playwright screenshot generation coverage. |
| edge-apps/asset-metadata/bun.lock | Locks updated dependencies for the redesigned app. |
| edge-apps/asset-metadata/.ignore | Adds ignore rules for Screenly/app tooling (node_modules). |
| edge-apps/asset-metadata/.gitignore | Adds standard ignores plus generated screenshot PNGs. |
| edge-apps/asset-metadata-old/vitest.config.ts | Preserved legacy Vitest config for the Vue app. |
| edge-apps/asset-metadata-old/vite.config.ts | Preserved legacy Vite config for the Vue app. |
| edge-apps/asset-metadata-old/tsconfig.vitest.json | Preserved legacy TS config for Vitest. |
| edge-apps/asset-metadata-old/tsconfig.node.json | Preserved legacy TS config for Node/tooling. |
| edge-apps/asset-metadata-old/tsconfig.json | Preserved legacy TS project references. |
| edge-apps/asset-metadata-old/tsconfig.app.json | Preserved legacy Vue app TS settings. |
| edge-apps/asset-metadata-old/static/images/icon.svg | Preserved legacy app icon asset. |
| edge-apps/asset-metadata-old/static/images/asset-metadata-app-preview.jpg | Preserved legacy README preview asset. |
| edge-apps/asset-metadata-old/src/test-setup.ts | Preserved legacy test setup with screenly global mock. |
| edge-apps/asset-metadata-old/src/main.ts | Preserved legacy Vue bootstrap entrypoint. |
| edge-apps/asset-metadata-old/src/components/tests/App.spec.ts | Preserved legacy Vue unit test coverage. |
| edge-apps/asset-metadata-old/src/assets/main.scss | Preserved legacy SCSS styling for the Vue UI. |
| edge-apps/asset-metadata-old/src/assets/font/Aeonik-Regular.woff2 | Preserved legacy font asset. |
| edge-apps/asset-metadata-old/src/assets/font/Aeonik-Regular.woff | Preserved legacy font asset. |
| edge-apps/asset-metadata-old/src/App.vue | Preserved legacy Vue component implementation. |
| edge-apps/asset-metadata-old/screenly.yml | Preserved legacy manifest for the Vue app. |
| edge-apps/asset-metadata-old/screenly_qc.yml | Preserved legacy QC manifest for the Vue app. |
| edge-apps/asset-metadata-old/README.md | Preserved legacy README. |
| edge-apps/asset-metadata-old/public/favicon.ico | Preserved legacy favicon asset. |
| edge-apps/asset-metadata-old/playwright.config.ts | Preserved legacy Playwright config. |
| edge-apps/asset-metadata-old/package.json | Preserved legacy dependencies/scripts for Vue app. |
| edge-apps/asset-metadata-old/index.html | Preserved legacy HTML shell for Vue app. |
| edge-apps/asset-metadata-old/eslint.config.ts | Preserved legacy ESLint config for Vue. |
| edge-apps/asset-metadata-old/e2e/vue.spec.ts | Preserved legacy Playwright smoke test. |
| edge-apps/asset-metadata-old/e2e/tsconfig.json | Preserved legacy e2e TS config. |
| edge-apps/asset-metadata-old/bun.lock | Preserved legacy lockfile. |
| edge-apps/asset-metadata-old/.vscode/extensions.json | Preserved legacy editor recommendations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| document.addEventListener('DOMContentLoaded', async () => { | ||
| setupErrorHandling() | ||
|
|
||
| app.mount('#app') | ||
| const { colors, logoUrl } = await setupBranding() | ||
|
|
There was a problem hiding this comment.
If setupBranding() (or any other awaited step) throws, signalReady() is never called, which can leave the player waiting indefinitely for the ready signal. Consider wrapping the async initialization in try/finally so signalReady() is always invoked (and optionally log/report the failure in the catch).
| document.documentElement.style.setProperty( | ||
| '--app-bg', | ||
| theme === 'dark' ? '#0D1117' : '#E8ECF1', | ||
| ) | ||
| document.documentElement.style.setProperty( | ||
| '--card-bg', | ||
| theme === 'dark' | ||
| ? 'rgba(255, 255, 255, 0.07)' | ||
| : 'rgba(255, 255, 255, 0.88)', | ||
| ) | ||
| document.documentElement.style.setProperty( | ||
| '--card-border', | ||
| theme === 'dark' ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.06)', | ||
| ) | ||
| document.documentElement.style.setProperty( | ||
| '--text-primary', | ||
| theme === 'dark' ? '#F2F2F3' : '#0D0E1A', | ||
| ) | ||
| document.documentElement.style.setProperty( | ||
| '--text-secondary', | ||
| theme === 'dark' ? '#9CA3AF' : '#6B7280', | ||
| ) | ||
| document.documentElement.style.setProperty('--chip-bg', colors.primary + '22') | ||
| document.documentElement.style.setProperty('--chip-color', colors.primary) |
There was a problem hiding this comment.
Several CSS variables are being set here (--app-bg, --card-bg, --text-primary, --text-secondary, --chip-bg, --chip-color) but the app’s CSS doesn’t reference most of them (e.g., .card-value/.card-label and .label-chip use hard-coded colors). This makes the theme/branding logic ineffective and harder to maintain. Either update style.css to use these variables (e.g., use var(--text-primary) / var(--chip-bg)), or remove the unused setProperty calls.
| const logoImg = document.getElementById('brand-logo') as HTMLImageElement | ||
| if (logoImg && logoUrl) { | ||
| logoImg.src = logoUrl | ||
| } |
There was a problem hiding this comment.
document.getElementById('brand-logo') as HTMLImageElement is an unsafe cast: getElementById can return null (or a non-HTMLImageElement). Consider using querySelector<HTMLImageElement>('#brand-logo') or casting to HTMLImageElement | null so the subsequent null-check is type-safe and future refactors don’t accidentally dereference a null value.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove empty `src` attribute to avoid spurious document URL request - Add `hidden` attribute so no broken-image icon appears before JS loads - Unhide the image only when a valid `logoUrl` is available Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
User description
Migrates the Asset Metadata Edge App away from Vue/TypeScript and redesigns it as a plain HTML/CSS/JavaScript app.
PR Type
Enhancement, Tests, Documentation
Description
Preserve legacy Vue asset metadata app
Render Screenly metadata in responsive cards
Configure Vite, TypeScript, manifests, dependencies
Add tests, docs, and editor tooling
Diagram Walkthrough
File Walkthrough
3 files
Add Playwright smoke test for metadata layoutAdd App rendering test with store mocksProvide shared `screenly` mock for unit tests12 files
Configure ESLint for Vue, Vitest, PlaywrightReuse shared Playwright blueprint test configurationConfigure Vite plugins, aliases, and asset copyingSet Vitest environment from merged Vite configRecommend workspace extensions for Vue developmentAdd TypeScript settings for Playwright testsAdd Screenly manifest with analytics settingsAdd QC manifest with mirrored app settingsConfigure app TypeScript paths and source inputsReference node, app, and Vitest projectsSet tooling TypeScript options for Node filesConfigure TypeScript support for Vitest environment4 files
Bootstrap Vue app with Pinia and stylesAdd HTML shell and Screenly script loadingCreate responsive grid styling for metadata cardsRender metadata cards from blueprint-backed stores1 files
Document app setup, testing, and deployment1 files
Define app scripts, tools, and dependencies