Hebrew Calendar: fix broken customizer, upgrade hebcal to v6, split code/data#4235
Open
barakplasma wants to merge 4 commits into
Open
Hebrew Calendar: fix broken customizer, upgrade hebcal to v6, split code/data#4235barakplasma wants to merge 4 commits into
barakplasma wants to merge 4 commits into
Conversation
- switch hebcal/core import from skypack (now 404/CORS) to esm.sh - fix undefined item appended to Upcoming list crashing Layout render - fix duplicate layout id (upcomingEvents+1 -> +i) - guard findNextEvent() so an exhausted calendar no longer crashes - pass numeric lat/lon to Location constructor
- upgrade @hebcal/core 3 -> 6 (esm.sh): update Location (now needs tzid, taken from the browser) and Zmanim (new (location, date, useElevation) signature) constructors - stop duplicating app.js inside customizer.html (~180 lines): ship the static app.js via url and the generated calendar as a separate hebrew_calendar.json data file; app reads it with Storage.readJSON - add app.js + the data file to metadata storage/data so a base install works and the data is cleaned up on uninstall - app handles an empty calendar gracefully with a hint to customize - remove dead enc()/heatshrink helper; allow_emulator -> true
Adding app.js to storage made sanitycheck apply the clock check, which flags loadWidgets being called before setUI. Register as a clock first (also the recommended order so widgets know a clock app is running).
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.
Fix customizer: @hebcal/core was loaded from skypack which now 404s/CORS-fails → switched to esm.sh and upgraded v3→v6 (updates Location/Zmanim constructors).
Fix runtime crashes: undefined "Upcoming" layout child, duplicate layout ids, crash when the calendar is exhausted, non-numeric lat/lon to Location.
Stop duplicating the whole app.js inside customizer.html; ship the calendar as a separate hebrew_calendar.json data file the app reads via Storage.readJSON.
setUI before loadWidgets (clock-app convention); allow emulator; remove dead code.