Conversation
Rebases and re-ports evcc-io#264 onto the current Glance/Preferences widget architecture introduced by evcc-io#255, applying the same simplifications: per-instance state via updateAppWidgetState (no WidgetConfig/SharedPreferences, no manual broadcast refresh), a rounded card matching Loadpoint's chrome, and reuse of Loadpoint's typography tokens for shared message/not-configured states instead of bespoke ones. Also applies the last-known-data cache pattern from evcc-io#283 so a transient fetch failure falls back to the last successful response instead of flashing Unreachable; the config screen's live preview stays uncached, matching LoadpointWidgetConfigActivity. - ForecastWidget.kt/ForecastWidgetConfigActivity.kt rewritten against the Glance state APIs; ChartRenderer.kt (Canvas-based chart rasterization, unaffected by the architecture change) ported unchanged - withAndroidWidget.ts: forecast receivers, appwidget-provider/preview XML, and config-activity manifest entries, styled like the Loadpoint preview - Theme.kt: forecastPalette()/four new text styles, replacing ~13 old bespoke forecast styles now that message/not-configured states are shared - new widget.androidConfig.* i18n keys (en/de) for the forecast config flow Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 tasks
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.
Replaces #264, rebased onto main after #255/#283 landed.
Adds the four forecast widgets (Solar/Price/CO₂/Feed-in) that #264 introduced, but re-ported onto the current Glance/Preferences widget architecture instead of the pre-#255 one #264 was built against — this is an alignment pass with the Loadpoint widget work in #255, not a straight rebase, since #255 replaced the old
WidgetConfig/SharedPreferences state mechanism and manual broadcast refresh with per-instanceupdateAppWidgetState.titleStyle/secondaryStyle/not-configured styles) for message states instead of ~13 bespoke forecast-only stylesLoadpointWidgetConfigActivity, which also has no cache fallback)ChartRenderer.kt, Canvas-based rasterization toBitmap) is unchanged from feat(widget): Android forecast widgets (Solar/Price/CO₂/Feed-in) #264 — hand-rolled rather than a charting library for now; left a detailed comment on feat(widget): Android forecast widgets (Solar/Price/CO₂/Feed-in) #264 on the Vicocompose-glanceoption for a possible follow-upTODO