diff --git a/CHANGELOG.md b/CHANGELOG.md index 94004de..11beeb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,24 @@ Format follows [Keep a Changelog](https://keepachangelog.com/) and [Semantic Ver > Users upgrading from v1.12.x or earlier will notice noticeably faster panel switching, > lower CPU usage during idle operation, and more stable map rendering. +--- +## [1.13.5] - 2026-03-14 β€” Route back-button and map popup flicker fixes + +### Fixed +- πŸ›  **Route page back-button navigated to main menu regardless of origin** β€” the two fixed navigation buttons (`/` and `/archive`) are replaced by a single `arrow_back` button that calls `window.history.back()`, so the user is always returned to the screen that opened the route page. +- πŸ›  **Map marker popup flickered on every 500 ms update tick** β€” the periodic `applyContacts` / `applyDevice` calls in `leaflet_map_panel.js` invoked `setIcon()` and `setPopupContent()` on all existing markers unconditionally. `setIcon()` rebuilds the marker DOM element; when a popup was open this caused the popup anchor to detach and reattach, producing visible flickering. Both functions now check `marker.isPopupOpen()` and skip icon/content updates while the popup is visible. +- πŸ›  **Map marker popup appeared with a flicker/flash on first click (main map and route map)** β€” Leaflet's default `fadeAnimation: true` caused popups to fade in from opacity 0, which on the Raspberry Pi rendered as a visible flicker. Both `L.map()` initialisations (`ensureMap` and `MeshCoreRouteMapBoot`) now set `fadeAnimation: false` and `markerZoomAnimation: false` so popups appear immediately without animation artefacts. + +### Changed +- πŸ”„ `meshcore_gui/gui/route_page.py` β€” Replaced two fixed-destination header buttons with a single `arrow_back` button using `window.history.back()`. +- πŸ”„ `meshcore_gui/static/leaflet_map_panel.js` β€” `applyDevice` and `applyContacts` guard `setIcon` / `setPopupContent` behind `isPopupOpen()`. Both `L.map()` calls add `fadeAnimation: false, markerZoomAnimation: false`. +- πŸ”„ `meshcore_gui/config.py` β€” Version bumped to `1.13.5`. + +### Impact +- Back navigation from the route page now always returns to the correct origin screen. +- Open marker popups are stable during map update ticks; content refreshes on next tick after the popup is closed. +- Popup opening is instant on both maps; no animation artefacts on low-power hardware. + --- ## [1.13.4] - 2026-03-12 β€” Room Server message classification fix diff --git a/meshcore_gui/config.py b/meshcore_gui/config.py index cfe4d5b..ab034ac 100644 --- a/meshcore_gui/config.py +++ b/meshcore_gui/config.py @@ -25,7 +25,7 @@ from typing import Any, Dict, List # ============================================================================== -VERSION: str = "1.13.4" +VERSION: str = "1.13.5" # ============================================================================== diff --git a/meshcore_gui/gui/route_page.py b/meshcore_gui/gui/route_page.py index 93e97e9..d56374c 100644 --- a/meshcore_gui/gui/route_page.py +++ b/meshcore_gui/gui/route_page.py @@ -143,12 +143,8 @@ class RoutePage: with ui.header().classes('items-center px-4 py-2 shadow-md'): ui.button( icon='arrow_back', - on_click=lambda: ui.navigate.to('/'), - ).props('flat round dense color=white').tooltip('Back to Dashboard') - ui.button( - icon='history', - on_click=lambda: ui.navigate.to('/archive'), - ).props('flat round dense color=white').tooltip('Back to Archive') + on_click=lambda: ui.run_javascript('window.history.back()'), + ).props('flat round dense color=white').tooltip('Back') ui.label('πŸ—ΊοΈ MeshCore Route').classes( 'text-lg font-bold domca-header-text' ).style("font-family: 'JetBrains Mono', monospace") diff --git a/meshcore_gui/static/leaflet_map_panel.js b/meshcore_gui/static/leaflet_map_panel.js index a845f4d..dc0000d 100644 --- a/meshcore_gui/static/leaflet_map_panel.js +++ b/meshcore_gui/static/leaflet_map_panel.js @@ -81,6 +81,8 @@ maxZoom: 19, zoomControl: true, preferCanvas: true, + fadeAnimation: false, + markerZoomAnimation: false, }); const state = { @@ -289,8 +291,11 @@ } state.deviceMarker.setLatLng(latLng); - state.deviceMarker.setIcon(icon); - state.deviceMarker.setPopupContent(popupHtml); + const devicePopupOpen = state.deviceMarker.isPopupOpen(); + if (!devicePopupOpen) { + state.deviceMarker.setIcon(icon); + state.deviceMarker.setPopupContent(popupHtml); + } state.deviceMarker.options.title = 'πŸ“‘ ' + device.name; } @@ -318,8 +323,11 @@ } existing.setLatLng(latLng); - existing.setIcon(markerIcon); - existing.setPopupContent(popupHtml); + const contactPopupOpen = existing.isPopupOpen(); + if (!contactPopupOpen) { + existing.setIcon(markerIcon); + existing.setPopupContent(popupHtml); + } existing.options.title = markerTitle; if (!state.layers.contacts.hasLayer(existing)) { state.layers.contacts.addLayer(existing); @@ -577,6 +585,8 @@ maxZoom: 19, zoomControl: true, preferCanvas: true, + fadeAnimation: false, + markerZoomAnimation: false, }); host.__meshcoreRouteMap = map;