-
-
Notifications
You must be signed in to change notification settings - Fork 33
fix(yeti): Some YETI fixes #4495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThese changes refactor map layer components and YetiView's tab management. Date validation logic now uses start-of-day semantics; zoom adjustment is removed from fitMapToFeatures; the country property is removed from WinterRouteLayer's layerSelector; and tab initialization is converted from direct method invocation to a computed property with a watcher. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
src/views/portals/YetiView.vue (2)
196-243: Consider renaming for clarity.Having both
tabsandlocalTabscan be confusing. While the distinction serves a purpose in the data flow (localTabsconstructs the tabs,tabsretrieves them from Yetix), consider renaming one for better clarity:
- Rename
localTabstotabsConfigurationorcomputedTabsState- Or rename
tabstoyetixTabsoractiveTabs
303-309: Remove unnecessarydeep: trueoption.Since
localTabsreturns a new array on each computation, thedeep: trueoption is unnecessary. Vue's reactivity will detect the array reference change without deep comparison.Apply this diff:
localTabs: { - deep: true, // nested immediate: true, // also when created handler(tabs) { Yetix.setTabs(tabs); }, },src/components/yeti/map-layers/DataAvalancheLayer.vue (1)
109-110: Day-based calculation change looks good; consider DRY-ing the “today” logic and double-checking timezone behaviorUsing a localized
'YYYY-MM-DD'anchor to strip the time part fordateValidanddifferenceDaysis a reasonable way to get more stable, day-based results.Since the
todayString→new Date(todayString)pattern is duplicated, you could optionally centralize it in a small helper (e.g.getTodayString()orgetTodayAtMidnight()) to keep semantics consistent if this ever needs to change again.Also, because this relies on
this.$dateUtils.toLocalizedString(..., 'YYYY-MM-DD')plusnew Date(todayString)parsing, it’s worth quickly sanity‑checking in your supported browsers/timezones (especially around DST boundaries) that you don’t get off‑by‑one‑day behavior for edge dates.Also applies to: 113-114
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/components/yeti/map-layers/DataAvalancheLayer.vue(1 hunks)src/components/yeti/map-layers/RouteLayer.vue(0 hunks)src/components/yeti/map-layers/WinterRouteLayer.vue(0 hunks)src/views/portals/YetiView.vue(2 hunks)
💤 Files with no reviewable changes (2)
- src/components/yeti/map-layers/WinterRouteLayer.vue
- src/components/yeti/map-layers/RouteLayer.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build (lts/*)
Hey there,
Here are some small YETI fixes (comment from #4457)
Thanks!
Vincent
Summary by CodeRabbit
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.