Skip to content

July 10, 2026 — Frontend

Release date: Friday, 2026-07-10

Summary

This week upgrades the BMS portfolio dashboard (/home) with live portfolio APIs, drag-and-drop widget layout, per-widget help, a building-condition chart, and server-synced user preferences. Mobile layout on the “Krever handling” widget was fixed to avoid horizontal page scroll.

Shipped

  • Portfolio data on /home — buildings and coverage lines from new portfolio APIs; client-side aggregation for KPIs, charts, and action lists (activity timeline still mock).
  • Dashboard widgets — hide/reorder, 2- or 3-column desktop layout, /home/edit with previews, info buttons with Norwegian descriptions.
  • Drag-and-drop — native pointer-based widget reordering (dnd-kit removed after pivot).
  • Bygningstilstand — new widget charting distribution by building.condition.
  • User preferences on server — load on login, debounced PATCH upsert (version + payload wrapper); theme, sidebar, tables, and dashboard layout included.
  • Mobile — “Krever handling” uses a stacked list on small screens instead of a wide table.

Engineering (commit recap)

Frontend — week of July 4 – July 10, 2026

Window: after 2026-07-03, before 2026-07-11 (--no-merges).

Summary

Nine commits focused on BMS portfolio dashboard and preferences: OpenAPI contract updates, portfolioApi / loader / utils, widget DnD and settings UX, widget info copy, building-condition chart, UserPreferencesProvider for server sync, and responsive fixes for the action-required widget.

Themes

  • Widget settings foundation (Jul 3 carry-over): registry, layout engine, /home/edit, local preference keys for dashboardWidgets and dashboardLayout.
  • Portfolio APIs & aggregation: GET /portfolio/buildings, GET /portfolio/coverage-lines; portfolioDashboardLoader and portfolioDashboardUtils power all widgets on PortfolioDashboardV1Page.
  • Drag-and-drop: native pointer drag with drop zones and preview; removed @dnd-kit after brief experiment.
  • Shared renderers & settings previews: createPortfolioWidgetRenderers, PortfolioWidgetPreview for /home/edit.
  • Widget info buttons: portfolioWidgetInfoNb, DashboardWidgetInfoButton in widget toolbar.
  • Building condition widget: chart_building_condition + OpenAPI condition on portfolio building rows.
  • Server-backed preferences: UserPreferencesContext, userPreferencesApi, sync mappers; PATCH body { version, payload }; theme loop and logout handling fixes.
  • Responsive dashboard: min-w-0 on grid/shell; mobile list layout for PortfolioActionRequiredTable.

Notable fixes or risks (if any)

  • Preferences PATCH initially sent flat JSON; backend requires { version: 1, payload: { ... } } — fixed in frontend.
  • Theme infinite loop after prefs sync — fixed via stable onThemeChange and skip when theme unchanged.
  • Portfolio and preferences endpoints are contract + BMS client only; backend Nest must implement and stay aligned with OpenAPI.
  • First login with updatedAt: null applies server defaults over old localStorage (by design).