-
Notifications
You must be signed in to change notification settings - Fork 12
[Draft]: Edge app library updates #616
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
base: master
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
@screenly/edge-appsis a TypeScript library and tooling set for building Screenly Edge Apps. It provides:Use this package when you want to build modern, Vite-based Edge Apps that follow Screenly’s best practices out of the box.
How is it structured?
At a high level:
src/: Source for the library itself.src/components/: Reusable UI components (app-header,brand-logo,dev-tools,auto-scaler, and registry utilities).src/core/: Core entry points for Edge Apps runtime helpers. This is there for backward compatibility.src/styles/: Base styles and design tokens (fonts, colors, spacing, typography, etc.).src/utils/: Utility functions for locale, time/date formatting, metadata, screen data, settings, theme, UTM, and weather.src/types/: Shared TypeScript types.src/test/: Test helpers and JSDOM setup for unit tests.template/: A minimal Edge App template (Vite + TypeScript + Tailwind CSS) used as the starting point when creating new apps.scripts/: CLI helpers (cli.ts,create.ts) used to generate apps from the template.bin/edge-apps-scripts.ts: The published CLI entry point (wired via theedge-apps-scriptsbinary inpackage.json).PR Type
Enhancement, Tests
Description
Add core web components (auto-scaler, header, dev-tools, logo)
Integrate CLI generator and app scaffolding scripts
Provide sample apps (clock-new, weather-new) with Vite configs
Include screen & weather utilities with unit tests
File Walkthrough
13 files
Implement `` web component for scalingCreate `` component with time/date displayAdd `` overlay for developmentIntroduce `` component with fallbackExport and register all web componentsAdd `initEdgeApp` helper for declarative setupDefine orientation and auto-scaler option typesAdd screen orientation detection utilitiesProvide weather icon mapping utilitiesExtend CLI with `create` commandAdd Weather App main logic and renderingAdd Clock App main logic and UI updatesConsolidate exports for utils, core, components, types4 files
Implement app generator CLI scriptConfigure Vite for library with custom pluginsSetup Vite config for weather-new appSetup Vite config for clock-new app1 files
Add unit tests for screen utilities55 files