feat(yeti): YETI updates for 2025/2026#4457
Conversation
- edit button at top right - new block to enable (and select) winter routes layer
- remove extent (france only until now) - handle route start and stop
WalkthroughAdds Meteo and Protected Areas map layers and a Meteo panel, centralizes tab state and protectedAreas persistence in Yetix, enhances route editing with split interaction and live draw metrics, adjusts multiple layer behaviors/UI props, and introduces several new components and OL/font-awesome exports. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Map
participant MeteoLayer
participant Yetix
participant SubPanelMeteo
User->>Map: click
Map->>MeteoLayer: onMapClick(coordinate)
MeteoLayer->>MeteoLayer: convert coordinate → lon/lat, place marker
MeteoLayer->>Yetix: emit 'lon-lat' {lon,lat}
Yetix->>SubPanelMeteo: deliver event
SubPanelMeteo->>SubPanelMeteo: build widget URL (lang, lat, lon)
SubPanelMeteo->>User: render iframe
sequenceDiagram
participant User
participant RouteLayer
participant DrawOverlay
participant Map
User->>RouteLayer: start drawing
loop each point
User->>RouteLayer: add point
RouteLayer->>RouteLayer: compute distance & bearing
RouteLayer->>DrawOverlay: update metrics & position
DrawOverlay->>User: show live metrics
end
User->>RouteLayer: Ctrl+Click segment
RouteLayer->>RouteLayer: SplitInteraction splits → emit 'split'
RouteLayer->>Map: onSplit applies new features, removes old
sequenceDiagram
participant User
participant ProtectedAreasLayer
participant SwissService
participant BioDiv
participant Overlay
User->>ProtectedAreasLayer: click map
par concurrent requests
ProtectedAreasLayer->>SwissService: fetch protected-area info
and
ProtectedAreasLayer->>BioDiv: fetch WMS GetFeatureInfo
end
ProtectedAreasLayer->>ProtectedAreasLayer: Promise.any → choose first result
ProtectedAreasLayer->>Overlay: set overlayData and show
User->>Overlay: interact / close
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60–90 minutes
Files/areas to inspect closely:
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.
Actionable comments posted: 5
🧹 Nitpick comments (1)
src/components/yeti/DropdownContent.vue (1)
26-39: Keep the dropdown synced with the new prop.The new
openprop seedslocalOpen, but once the component is mounted a parent update toopenwon’t be reflected because nothing watches the prop. Please mirror the prop so the dropdown can be controlled externally.export default { props: { @@ data() { return { localOpen: this.open, }; }, + watch: { + open(newValue) { + this.localOpen = newValue; + }, + }, methods: {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
src/assets/img/yeti/layers/protected-areas.jpgis excluded by!**/*.jpg
📒 Files selected for processing (19)
src/components/yeti/DropdownContent.vue(2 hunks)src/components/yeti/EditModeButton.vue(2 hunks)src/components/yeti/SubPanelCourse.vue(4 hunks)src/components/yeti/SubPanelMeteo.vue(1 hunks)src/components/yeti/YetiMap.vue(1 hunks)src/components/yeti/Yetix.vue(8 hunks)src/components/yeti/map-layers/AvalancheBulletinsLayer.vue(4 hunks)src/components/yeti/map-layers/DataAvalancheLayer.vue(1 hunks)src/components/yeti/map-layers/FfvlLayer.vue(1 hunks)src/components/yeti/map-layers/MeteoLayer.vue(1 hunks)src/components/yeti/map-layers/NivosesLayer.vue(1 hunks)src/components/yeti/map-layers/OverlaysLayers.vue(5 hunks)src/components/yeti/map-layers/ProtectedAreasLayer.vue(1 hunks)src/components/yeti/map-layers/RouteLayer.vue(7 hunks)src/components/yeti/map-layers/WinterRouteLayer.vue(1 hunks)src/components/yeti/map-layers/WinterRouteLayerContent.vue(1 hunks)src/js/libs/ol.js(4 hunks)src/js/vue-plugins/font-awesome-config.js(2 hunks)src/views/portals/YetiView.vue(6 hunks)
⏰ 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). (2)
- GitHub Check: build (lts/*)
- GitHub Check: CodeQL-Build
🔇 Additional comments (2)
src/components/yeti/map-layers/DataAvalancheLayer.vue (1)
54-54: Change is intentional and correctly implemented.The change from 15 to 5 days is documented in commit b6daa98 (
feat(yeti): Switch icon color from 15 to 5 days, Feb 17 2025). The code is syntactically correct and properly integrated into the color-selection logic for Data-Avalanche features.The commit message confirms the feature intent. However, verify that the 5-day threshold aligns with your avalanche data practices and user expectations for the season.
src/components/yeti/map-layers/FfvlLayer.vue (1)
17-17: LGTM! Good i18n practice.Adding
translate-context="yeti"helps translators disambiguate "History" within the YETI module context.Verification shows that
translate-contextis selectively applied across YETI components (notably for action verbs in SubPanelCourse.vue), making this change consistent with the codebase's i18n approach.
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (5)
src/components/yeti/map-layers/RouteLayer.vue (5)
57-65: Consider simplifying the insertion guard logic.Lines 59-60 check whether
coordinates[insertIndex]differs from the split point, but sinceinsertIndexpoints to the coordinate after the segment where the split point was found, this check is always true and can be removed. Additionally, the check on lines 61-62 prevents splitting when the split point coincides with the first vertex, which may be an unnecessary restriction.Consider simplifying to:
if ( insertIndex !== undefined && - coordinates[insertIndex][0] !== this.coordinate_[0] && - coordinates[insertIndex][1] !== this.coordinate_[1] && - coordinates[0][0] !== this.coordinate_[0] && - coordinates[0][1] !== this.coordinate_[1] + !coordinates.some(c => c[0] === this.coordinate_[0] && c[1] === this.coordinate_[1]) ) {This checks that the split point is not already a vertex, which is the actual intent.
101-109: Consider adjusting pointOnSegment tolerance for robustness.The cross-product tolerance of
1e-3may be too strict for typical map coordinate systems, potentially causing false negatives due to floating-point precision. Consider increasing it to1e-1or making it configurable.
413-419: Simplify distance check.The
if (distance > 0)check is unnecessary sinceMath.round()handles zero correctly.- if (distance > 0) { - this.drawInfo.distance = Math.round(distance); - this.drawInfo.bearing = Math.round(bearing); - } else { - this.drawInfo.distance = 0; - this.drawInfo.bearing = 0; - } + this.drawInfo.distance = Math.round(distance); + this.drawInfo.bearing = Math.round(bearing);
741-754: Module-level editStyle mutation is safe but brittle.The code mutates the module-level
editStylearray, which would be problematic if multiple component instances existed. While this appears designed as a singleton (via Yetix global store), consider movingeditStyleinto component instance data for better encapsulation.
796-804: Consider enhancing overlay visibility.The yellow background works, but adding a subtle shadow or border could improve legibility over varied map backgrounds.
.draw-info-overlay { background: yellow; padding: 2px; border-radius: 2px; font-size: 0.85rem; min-width: 60px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); + border: 1px solid rgba(0, 0, 0, 0.2); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/components/yeti/EditModeButton.vue(2 hunks)src/components/yeti/map-layers/OverlaysLayers.vue(5 hunks)src/components/yeti/map-layers/ProtectedAreasLayer.vue(1 hunks)src/components/yeti/map-layers/RouteLayer.vue(7 hunks)
⏰ 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/*)
🔇 Additional comments (17)
src/components/yeti/EditModeButton.vue (2)
9-9: LGTM!The conditional rendering correctly hides the text label when
iconOnlyistrue.
19-28: LGTM!The new props are properly typed with sensible defaults and are correctly consumed in the template.
src/components/yeti/map-layers/RouteLayer.vue (14)
1-6: LGTM! Clean overlay template.The draw info overlay template is well-structured with appropriate icons and locale-aware number formatting for distance display.
9-9: LGTM!The FontAwesome icon import is appropriate for the dynamic icon generation used in the keyboard event handlers.
68-83: LGTM! Split logic correctly prevents out-of-bounds access.The
splitDoneflag properly addresses the previous review concern about repeated split points in rings or self-crossing lines.
237-241: LGTM!The overlay configuration is appropriate with sensible positioning and offset values.
276-287: LGTM!The keyboard event listener lifecycle is properly managed, adding listeners when entering edit mode and cleaning them up when exiting.
303-305: LGTM!The overlay setup correctly binds the Vue template ref to the OpenLayers overlay and adds it to the map.
385-424: LGTM! Distance and bearing calculations are correct.The spherical distance calculation and bearing formula are implemented correctly using standard geodetic formulas.
428-431: LGTM!The split interaction is properly instantiated and configured with the correct layer reference.
439-439: LGTM!The split event is properly wired to the
onSplithandler.
443-457: LGTM!The split interaction is correctly managed alongside other interactions, and the overlay is properly cleaned up when interactions are disabled.
458-470: The state inconsistency issue was already flagged in the review of lines 248-252.
474-477: LGTM!The split handler correctly processes the split event by adding new features and removing the original.
719-773: LGTM! Contextual hints provide good UX.The dynamic icon and tooltip injection based on keyboard modifiers is well-implemented and enhances the editing experience.
774-788: LGTM! Cleanup logic correctly handles keyboard state.The hint removal correctly checks modifier states and style array length to ensure proper cleanup only when appropriate.
src/components/yeti/map-layers/OverlaysLayers.vue (1)
56-58: Optional chaining guard looks goodThe optional chaining keeps
meteoTabfrom exploding when the tabs array is empty, so the overlays stack won’t crash on first render anymore.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
src/assets/img/yeti/logo-ensg.jpgis excluded by!**/*.jpgsrc/assets/img/yeti/logo-geodataparis.jpgis excluded by!**/*.jpg
📒 Files selected for processing (1)
src/views/portals/YetiView.vue(6 hunks)
⏰ 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). (2)
- GitHub Check: build (lts/*)
- GitHub Check: CodeQL-Build
🔇 Additional comments (6)
src/views/portals/YetiView.vue (6)
115-115: LGTM!The SubPanelMeteo component import and registration follows the established pattern for other sub-panel components in this view.
Also applies to: 135-135
67-69: LGTM!The new Meteo panel is correctly added with index 3, following the sequential pattern of existing panels and matching the new tab structure.
75-79: Branding update looks good.The logo link and assets have been consistently updated to Géodata Paris branding. Note that the URL uses
httprather thanhttps.
194-194: LGTM!Centralizing tab state in Yetix improves separation of concerns and aligns with the PR's objective to consolidate tab management.
267-269: LGTM!Tab initialization in the
createdhook follows a logical sequence and properly builds and registers tabs with the centralized Yetix state.
643-645: LGTM!The style rule appropriately adds border-radius to small buttons and is correctly placed in the non-scoped styles section.
|
@brunobesson Hello, any info on this? Thanks |
|
I'll have a look asap, sorry |
|
As usual, very nice work! If I had more time, there is some stuff I would love to have within the rest of c2c too 😍 Functionnaly, the only strage thing I saw is the winter routes for Switzerland. I did not see them? (nothing shown, no request...) The layer switch still has the french flag too. |
|
(I merged and will release today or within the week despite my comment) |
|
I still have to create a virtual layer in our geoserver with FRA and CHE data. |
|
I have just created an aggregated layer for FRA/CHE data. It will be cropped on the french Alps bbox until #4457 will be released. |
|
It has been released today 😁 |
Good catch! Will make another PR... |
Hello everyone,
Here is a PR for YETI app. Let's resume key features:
Thanks for review and merging.
Screenshots:





Summary by CodeRabbit
New Features
Improvements