feat: earthquakes near this screen — two files, no libraries - #4
Merged
Conversation
…it app.js into maths, render and app layers
Same app, less of it. Own code goes from ~990 lines to ~450. - merge maths.js and render.js into app.js; both files are gone - the map label is now a Leaflet tooltip, so Leaflet places it. Drops the screen projection, the label-area measuring, the card position clamping and the leader-line geometry (~200 lines) - only quakes currently on screen can be labelled, which is one call to map.getBounds().contains instead of the old on-screen test - drop the Pacific-centred world view. It needed every longitude wrapped and the whole map drawn twice to fill past the date line. Map is now centred on 0, so wrapLongitude, shiftGeoJsonEast and drawWorldCopies go - magnitude colours move from CSS variables into app.js, so pickMagnitudeColor no longer reads them back out of the stylesheet - the screen scale factor is worked out once at startup instead of being re-read inside six draw functions - add magnitudeOf/locationOf/timeOf so nothing else has to know that coordinates[1] means latitude - the map now stops where the rail starts, so nothing drawn can hide under it Kept as they were: config and readSetting, pickMagnitudeColor, the plate boundaries, Leaflet and the offline world data. No change to the settings, the feed, or what the player sees apart from the world view no longer being Pacific-centred.
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces a dependency-free Screenly Edge App that displays nearby USGS earthquakes relative to the player’s configured location.
Changes:
- Adds the complete map and earthquake-feed UI.
- Adds Screenly deployment configuration and distance-unit selection.
- Updates documentation and removes unused Python/SQL tooling.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
index.html |
Implements the earthquake map and feed handling. |
screenly.yml |
Defines the Screenly app manifest and units setting. |
.ignore |
Excludes non-deployment files. |
README.md |
Documents behavior, mapping, and deployment. |
.pre-commit-config.yaml |
Removes unused Python hooks. |
.sqlfluff |
Removes unused SQL linting configuration. |
pyrightconfig.json |
Removes unused Python type-checking configuration. |
ruff.toml |
Removes unused Python linting configuration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
|
readySignal, please |
renatgalimov
approved these changes
Aug 20, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of Change
The edge app, rebuilt: two files, no libraries, no build step, no web fonts, one setting, nothing fetched but the feed.
screenly.js. Nothing animates.viewBox. Inlined rather than fetched because a separate asset does not reach the player..git,.githuband the README out of the deployed bundle. Also removes.pre-commit-config.yaml,ruff.toml,.sqlfluffandpyrightconfig.json— no Python or SQL in this repo.The view is centred on the screen and sized to hold the ten nearest quakes, so a screen in California sees its own neighbourhood and one in London sees the North Atlantic. A screen with no location set says exactly that, rather than showing the Gulf of Guinea — which is what an unset screen actually reports.
Checklist
Before submitting this PR, please ensure that you have completed the following: