feat(ali-je-vroce): use contextual percentile descriptions when avg t…#366
feat(ali-je-vroce): use contextual percentile descriptions when avg t…#366
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds contextual percentile descriptions to the "Ali je vroče" (Is it hot) weather component based on the current average temperature. When the average temperature is below 30°C, the application now displays more contextually appropriate descriptions that emphasize relative warmth/coldness "for this time of year" rather than absolute temperature assessments.
Changes:
- Added a new set of temperature descriptions (
opisi_pod_30) that provide contextual feedback relative to seasonal expectations - Implemented logic to dynamically select between absolute and contextual descriptions based on whether the average temperature is below 30°C
- Updated imports to include the new description set
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| code/ali-je-vroce/vroce.tsx | Added getDescriptionsForTemperature function to conditionally return description sets based on temperature threshold; updated component to use dynamic descriptions |
| code/ali-je-vroce/constants.ts | Added opisi_pod_30 constant with contextual temperature descriptions emphasizing seasonal relativity |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@kesma01 i'll take a look over the weekend |
…o for reactive tracking Co-authored-by: jalezi <44704999+jalezi@users.noreply.github.com>
Convert getDescriptionsForTemperature to createMemo for reactive updates
| 'p40': 'Običajne temperature za ta čas leta', | ||
| 'p60': 'Topleje kot običajno', | ||
| 'p80': 'Zelo toplo za ta čas leta', | ||
| 'p95': 'Izjemno toplo za ta čas leta', |
There was a problem hiding this comment.
Nerad popravljam tekst, ampak meni se lepse slisi "za ta letni čas".
There was a problem hiding this comment.
"Letni časi" so samo štirje in bi se lahko zdelo, da gre za bolj grobo oceno, kot je v resnici - na osnovi dolgoletnih povprečij.
There was a problem hiding this comment.
Potem pa mogoce "čas v letu"
There was a problem hiding this comment.
Meni je ta čas v letu tudi ok. Verjetno je ta čas leta nepravilno jezikovno.
…emp < 30°C
Spremembo sem naredil s pomočjo codex in sprobal lokalno samo na kompu.