fix: Weather widget positioning and z-index

- Position at 64px from top (desktop & mobile)
- z-index 830 (above FAB, below searchbar dropdown)
- Throttle map updates to 2 seconds
- Click outside to close expanded view

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Your Name 2026-01-21 10:38:06 +00:00
parent 3c3a6639e4
commit 30c962e95e
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
pointer-events: none; pointer-events: none;
z-index: 500; z-index: 830; /* Above FAB (820) but below searchbar dropdown (850) */
overflow: hidden; overflow: hidden;
} }
@ -24,7 +24,7 @@
} }
.app-slot-top-left { .app-slot-top-left {
top: 78px; /* Below search bar */ top: 64px; /* Below search bar */
left: 13px; left: 13px;
align-items: flex-start; align-items: flex-start;
} }
@ -157,7 +157,7 @@
@media (max-width: 640px) { @media (max-width: 640px) {
.app-slot-top-left, .app-slot-top-left,
.app-slot-top-right { .app-slot-top-right {
top: 60px; top: 64px;
} }
.app-slot-bottom-left, .app-slot-bottom-left,

View File

@ -144,7 +144,7 @@ export default function WeatherWidget({ appInstanceId, appHost, config = {} }) {
if (!context || context.sectorId === lastSectorId) return; if (!context || context.sectorId === lastSectorId) return;
const now = Date.now(); const now = Date.now();
if (now - lastRequestTimeRef.current < 1000) return; // Throttle: 1 second min if (now - lastRequestTimeRef.current < 2000) return; // Throttle: 2 seconds min
setLastSectorId(context.sectorId); setLastSectorId(context.sectorId);
lastRequestTimeRef.current = now; lastRequestTimeRef.current = now;