Repository navigation
Add rolling forecast slots (now..+2h, +2h..+4h, ...) - #6
Merged
Merged
Conversation
Adds a Rolling Slots setting/--rolling flag: instead of fixed clock times, each refresh anchors the first slot to the current hour and steps forward by 2h. For a 1-day range this is one continuous 16h window; for 2 days, only today rolls -- tomorrow gets a fixed 6am/10am/2pm/6pm spread instead of a rolling continuation, since "tomorrow" is meant to be a deliberate full day, not whatever oddly-timed hours the rollover lands on. Also fixes a layout bleed this surfaced: when a day's cells wrap to two grid rows, every .wc-day block was getting an equal flex:1 share regardless of its own row count, so a 2-row block could overflow into a 1-row sibling. Each day's row count is now in the payload (d.rows) and the templates size blocks proportionally via a data-rows attribute. Also tightened half_vertical's icon size/padding, which was clipping its bottom row even after the proportional fix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
rolling_modecustom field /--rollingCLI flag): instead of fixed clock times, the first slot anchors to the current hour and steps forward by 2h on every refresh, so the forecast always shows what's coming up next.trmnl_report.py(--rolling),weather.cgi(?rolling=1), and the plugin'spolling_url/custom fields insrc/settings.yml.Bleed fix surfaced by this work
Rolling mode can produce a day-block with 2 rows of cells alongside a sibling with just 1 row. The templates previously gave every
.wc-dayan equalflex:1share regardless of content, so a 2-row block would overflow into its sibling (overlapping text/headers). Fixed by:d.rows) and sizing blocks proportionally via adata-rowsattribute + CSS infull.liquid,half_vertical.liquid,half_horizontal.liquid.half_vertical's icon size/padding, which was still clipping its bottom row even after the proportional fix (not enough total height for current-weather panel + a 2-row day + a 1-row day).Test plan
--rollingCLI flag andweather.cgi?rolling=1query param.🤖 Generated with Claude Code