Skip to content

Comments

feat: added support for limiting hourly and daily forecast slots#49

Merged
troinine merged 1 commit intomainfrom
feature/forecast-slots
Jan 1, 2026
Merged

feat: added support for limiting hourly and daily forecast slots#49
troinine merged 1 commit intomainfrom
feature/forecast-slots

Conversation

@troinine
Copy link
Owner

@troinine troinine commented Jan 1, 2026

Closes #17

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for limiting the number of hourly and daily forecast entries displayed in the weather forecast card. Users can now configure hourly_slots and daily_slots to control how many forecast items are shown, with support for values starting from 0 (no entries) to unlimited (when not specified).

  • Added hourly_slots and daily_slots configuration options to the forecast config
  • Implemented slot limiting logic that correctly applies after hourly grouping
  • Added comprehensive test coverage for various slot limit scenarios
  • Updated editor UI with new configuration fields and help text

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/types.ts Added hourly_slots and daily_slots as optional number fields to the forecast configuration interface
src/weather-forecast-card.ts Implemented slot limiting logic using array slicing, correctly applying limits after hourly grouping aggregation
src/editor/weather-forecast-card-editor.ts Added UI schema entries and localization for the new slot configuration fields with appropriate minimum values
test/weather-forecast-card.test.ts Added comprehensive test suite covering daily slots, hourly slots, combination with grouping, zero slots, and undefined behavior
README.md Updated documentation table with descriptions for the new hourly_slots and daily_slots configuration options

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@troinine troinine merged commit 40caa5b into main Jan 1, 2026
9 checks passed
@troinine troinine deleted the feature/forecast-slots branch January 1, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR] Forecast Slots

1 participant