-
Notifications
You must be signed in to change notification settings - Fork 12
feat(asset-metadata): migrate and redesign asset metadata app #776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
nicomiguelino
wants to merge
6
commits into
master
Choose a base branch
from
feat/migrate-asset-metadata-app
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
479c0f8
chore(asset-metadata): rename existing app directory to asset-metadat…
nicomiguelino d523707
feat(asset-metadata): scaffold and implement migrated app
nicomiguelino f279d27
feat(asset-metadata): add app-header to layout
nicomiguelino 416c6dd
feat(asset-metadata): apply glassmorphic design with background image
nicomiguelino d3f2ee5
chore(asset-metadata): swap background image to sunny variant
nicomiguelino 132c08c
fix(asset-metadata): prevent broken image request for brand logo
nicomiguelino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| # Screenly Asset Metadata | ||
|
|
||
|  | ||
|
|
||
| This Edge App displays the screen metadata - Hostname, Screen Name, Position , Hardware name, Firmware version, Labels, etc. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - [Bun (1.2.2+)](https://bun.sh/docs/installation) | ||
| - [Screenly Edge App CLI (v1.0.3+)](https://github.com/Screenly/cli?tab=readme-ov-file#installation) | ||
|
|
||
| ## Getting Started | ||
|
|
||
| ```bash | ||
| bun install | ||
| screenly edge-app create \ | ||
| --name=EDGE_APP_NAME \ | ||
| --in-place | ||
| ``` | ||
|
|
||
| ## Create an Edge App Instance via CLI | ||
|
|
||
| ```bash | ||
| screenly edge-app instance create --name=EDGE_APP_INSTANCE_NAME | ||
| ``` | ||
|
|
||
| ## Deployment | ||
|
|
||
| ```bash | ||
| bun run deploy | ||
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > The `deploy` command takes care of building the app as well. | ||
|
|
||
| ## Development | ||
|
|
||
| Install the dependencies for the first run: | ||
|
|
||
| ```bash | ||
| bun install | ||
| ``` | ||
|
|
||
| Run the development environment with a single command: | ||
|
|
||
| ```bash | ||
| bun run dev | ||
| ``` | ||
|
|
||
| This will build in watch mode and start the development server via [Screenly CLI](https://github.com/Screenly/cli). | ||
|
|
||
| ## Unit Tests | ||
|
|
||
| To run unit tests: | ||
|
|
||
| ```bash | ||
| bun run test:unit | ||
| ``` | ||
|
|
||
| Press `q` to quit the test runner. | ||
|
|
||
| ## E2E Tests | ||
|
|
||
| Install dependencies for the first run: | ||
|
|
||
| ```bash | ||
| bun run playwright install-deps | ||
| bun run playwright install | ||
| ``` | ||
|
|
||
| To run E2E tests: | ||
|
|
||
| ```bash | ||
| bun run test:e2e | ||
| ``` | ||
|
|
||
| ### Linting and Formatting | ||
|
|
||
| ```bash | ||
| bun run lint | ||
| bun run format | ||
| ``` |
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Edge App</title> | ||
| </head> | ||
| <body> | ||
| <div id="app"></div> | ||
| <script src="screenly.js?version=1"></script> | ||
| <script type="module" src="/src/main.ts"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| { | ||
| "name": "asset-metadata", | ||
| "version": "0.0.0", | ||
| "private": true, | ||
| "type": "module", | ||
| "scripts": { | ||
| "generate-mock-data": "screenly edge-app run --generate-mock-data", | ||
| "build:dev": "vite build --mode=development", | ||
| "build:dev:watch": "vite build --mode=development --watch", | ||
| "predev": "bun run generate-mock-data && bun run build:dev", | ||
| "dev": "run-p build:dev:watch dev:edge", | ||
| "dev:edge": "screenly edge-app run --path=dist/", | ||
| "dev:test": "vite --mode test", | ||
| "build": "run-p type-check \"build-only {@}\" --", | ||
| "preview": "vite preview", | ||
| "test:unit": "vitest", | ||
| "test:e2e": "playwright test", | ||
| "build-only": "vite build", | ||
| "type-check": "vue-tsc --build", | ||
| "lint": "eslint . --fix", | ||
| "format": "prettier --write src/ README.md index.html", | ||
| "format:check": "prettier --check src/ README.md index.html", | ||
| "predeploy": "bun run build", | ||
| "deploy": "screenly edge-app deploy --path dist/", | ||
| "clear-mock-data": "rimraf mock-data.yml", | ||
| "prepare": "cd ../blueprint && bun install" | ||
| }, | ||
| "prettier": "../.prettierrc.json", | ||
| "dependencies": { | ||
| "@typescript-eslint/typescript-estree": "^8.58.0", | ||
| "pinia": "^3.0.4", | ||
| "vue": "^3.5.32", | ||
| "yaml": "^2.8.3" | ||
| }, | ||
| "devDependencies": { | ||
| "@playwright/test": "^1.59.1", | ||
| "@tsconfig/node22": "^22.0.5", | ||
| "@types/jsdom": "^28.0.1", | ||
| "@types/node": "^25.5.2", | ||
| "@vitejs/plugin-vue": "^6.0.5", | ||
| "@vitest/eslint-plugin": "^1.6.14", | ||
| "@vue/eslint-config-prettier": "^10.2.0", | ||
| "@vue/eslint-config-typescript": "^14.7.0", | ||
| "@vue/test-utils": "^2.4.6", | ||
| "@vue/tsconfig": "^0.9.1", | ||
| "eslint": "^10.2.0", | ||
| "eslint-plugin-playwright": "^2.10.1", | ||
| "eslint-plugin-vue": "~10.8.0", | ||
| "jiti": "^2.6.1", | ||
| "jsdom": "^29.0.1", | ||
| "npm-run-all2": "^8.0.4", | ||
| "prettier": "3.8.1", | ||
| "rimraf": "^6.1.3", | ||
| "sass-embedded": "^1.99.0", | ||
| "typescript": "~6.0.2", | ||
| "vite": "^8.0.5", | ||
| "vite-plugin-static-copy": "^4.0.1", | ||
| "vite-plugin-vue-devtools": "^8.1.1", | ||
| "vitest": "^4.1.2", | ||
| "vue-tsc": "^3.2.6" | ||
| } | ||
| } |
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| --- | ||
| syntax: manifest_v1 | ||
| id: 01JH83JQZ2FX46WG5H7FFEAGFE | ||
| description: Displays the screen metadata like position on Google map, coordinates, hostname, etc. | ||
| icon: https://playground.srly.io/edge-apps/asset-metadata/static/images/icon.svg | ||
| author: Screenly, Inc. | ||
| categories: | ||
| - Utilities | ||
| ready_signal: true | ||
| settings: | ||
| enable_analytics: | ||
| type: string | ||
| default_value: 'true' | ||
| title: enable_analytics | ||
| optional: true | ||
| help_text: | | ||
| Toggle to enable or disable Sentry and Google Analytics integrations. | ||
| is_global: true | ||
| sentry_dsn: | ||
| type: secret | ||
| title: Sentry Client Key | ||
| optional: true | ||
| help_text: | | ||
| Enter your Sentry DSN to enable error tracking. | ||
| is_global: true | ||
| tag_manager_id: | ||
| type: string | ||
| default_value: '' | ||
| title: tag_manager_id | ||
| optional: true | ||
| help_text: | | ||
| Enter your Google Tag Manager container ID to enable tracking and analytics. | ||
| is_global: true | ||
| theme: | ||
| type: string | ||
| default_value: light | ||
| title: Theme | ||
| optional: false | ||
| help_text: | | ||
| Select the visual theme for the app ('light' or 'dark'). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| --- | ||
| syntax: manifest_v1 | ||
| id: 01JZHRAN99KQN84VTZ55EJP3SP | ||
nicomiguelino marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| description: Displays the screen metadata like position on Google map, coordinates, hostname, etc. | ||
| icon: https://playground.srly.io/edge-apps/asset-metadata/static/images/icon.svg | ||
| author: Screenly, Inc. | ||
| categories: | ||
| - Utilities | ||
| ready_signal: true | ||
| settings: | ||
| enable_analytics: | ||
| type: string | ||
| default_value: 'true' | ||
| title: enable_analytics | ||
| optional: true | ||
| help_text: | | ||
| Toggle to enable or disable Sentry and Google Analytics integrations. | ||
| is_global: true | ||
| sentry_dsn: | ||
| type: secret | ||
| title: Sentry Client Key | ||
| optional: true | ||
| help_text: | | ||
| Enter your Sentry DSN to enable error tracking. | ||
| is_global: true | ||
| tag_manager_id: | ||
| type: string | ||
| default_value: '' | ||
| title: tag_manager_id | ||
| optional: true | ||
| help_text: | | ||
| Enter your Google Tag Manager container ID to enable tracking and analytics. | ||
| is_global: true | ||
| theme: | ||
| type: string | ||
| default_value: light | ||
| title: Theme | ||
| optional: false | ||
| help_text: | | ||
| Select the visual theme for the app ('light' or 'dark'). | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import '@/assets/main.scss' | ||
|
|
||
| import { createApp } from 'vue' | ||
| import { createPinia } from 'pinia' | ||
| import App from './App.vue' | ||
|
|
||
| const app = createApp(App) | ||
|
|
||
| app.use(createPinia()) | ||
|
|
||
| app.mount('#app') |
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "files": [], | ||
| "references": [ | ||
| { | ||
| "path": "./tsconfig.node.json" | ||
| }, | ||
| { | ||
| "path": "./tsconfig.app.json" | ||
| }, | ||
| { | ||
| "path": "./tsconfig.vitest.json" | ||
| } | ||
| ] | ||
| } |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| node_modules/ | ||
| dist/ | ||
| *.log | ||
| .DS_Store | ||
| screenshots/*.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| node_modules/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,82 +1,60 @@ | ||
| # Screenly Asset Metadata | ||
| # Asset Metadata | ||
|
|
||
|  | ||
|
|
||
| This Edge App displays the screen metadata - Hostname, Screen Name, Position , Hardware name, Firmware version, Labels, etc. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - [Bun (1.2.2+)](https://bun.sh/docs/installation) | ||
| - [Screenly Edge App CLI (v1.0.3+)](https://github.com/Screenly/cli?tab=readme-ov-file#installation) | ||
| Displays screen metadata on Screenly digital signage players, including hostname, screen name, hardware type, firmware version, GPS coordinates, and assigned labels. | ||
|
|
||
| ## Getting Started | ||
|
|
||
| ```bash | ||
| bun install | ||
| screenly edge-app create \ | ||
| --name=EDGE_APP_NAME \ | ||
| --in-place | ||
| ``` | ||
|
|
||
| ## Create an Edge App Instance via CLI | ||
| ## Development | ||
|
|
||
| ```bash | ||
| screenly edge-app instance create --name=EDGE_APP_INSTANCE_NAME | ||
| bun run dev | ||
| ``` | ||
|
|
||
| ## Deployment | ||
| ## Building | ||
|
|
||
| ```bash | ||
| bun run deploy | ||
| bun run build | ||
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > The `deploy` command takes care of building the app as well. | ||
|
|
||
| ## Development | ||
|
|
||
| Install the dependencies for the first run: | ||
| ## Testing | ||
|
|
||
| ```bash | ||
| bun install | ||
| bun run test | ||
| ``` | ||
|
|
||
| Run the development environment with a single command: | ||
| ## Linting & Formatting | ||
|
|
||
| ```bash | ||
| bun run dev | ||
| bun run lint | ||
| bun run format | ||
| ``` | ||
|
|
||
| This will build in watch mode and start the development server via [Screenly CLI](https://github.com/Screenly/cli). | ||
|
|
||
| ## Unit Tests | ||
| ## Deployment | ||
|
|
||
| To run unit tests: | ||
| Create and deploy the Edge App: | ||
|
|
||
| ```bash | ||
| bun run test:unit | ||
| screenly edge-app create --name asset-metadata --in-place | ||
| bun run deploy | ||
| screenly edge-app instance create | ||
| ``` | ||
|
|
||
| Press `q` to quit the test runner. | ||
|
|
||
| ## E2E Tests | ||
| ## Screenshots | ||
|
|
||
| Install dependencies for the first run: | ||
| Generate screenshots at all supported resolutions: | ||
|
|
||
| ```bash | ||
| bun run playwright install-deps | ||
| bun run playwright install | ||
| bun run screenshots | ||
| ``` | ||
|
|
||
| To run E2E tests: | ||
|
|
||
| ```bash | ||
| bun run test:e2e | ||
| ``` | ||
| Screenshots are saved to the `screenshots/` directory. | ||
|
|
||
| ### Linting and Formatting | ||
| ## Configuration | ||
|
|
||
| ```bash | ||
| bun run lint | ||
| bun run format | ||
| ``` | ||
| | Setting | Description | Type | Default | | ||
| | ------- | ----------------------------------------- | -------- | ------- | | ||
| | `theme` | Visual theme for the app (`light`/`dark`) | required | `light` | |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.