Skip to content

feat: update UI#71

Merged
drduhe merged 1 commit intomainfrom
feat/update-ui
Feb 12, 2026
Merged

feat: update UI#71
drduhe merged 1 commit intomainfrom
feat/update-ui

Conversation

@drduhe
Copy link
Copy Markdown
Collaborator

@drduhe drduhe commented Feb 12, 2026

Issue #, if available: n/a

UI Modernization & Feature Popup Redesign

Summary

Complete overhaul of the OSML Cesium Globe UI -- replacing the CloudScape design system with a custom glass-morphism dark theme, removing default Cesium widgets, adding cinematic globe enhancements, and redesigning the feature click popup as a rich HTML overlay.

Changes

Design System Migration

  • Removed CloudScape dependency (@cloudscape-design/components, @cloudscape-design/global-styles, @cloudscape-design/component-toolkit) entirely from package.json -- the enterprise-style components clashed with the dark globe aesthetic and caused styling issues (e.g., white-on-white dropdowns in portals).
  • Created custom dark modal system (DarkModal.tsx / DarkModal.css) with glass-morphism panels, backdrop blur, entrance animations, header/body/footer layout, and tab support.
  • Created custom form controls (FormControls.tsx / FormControls.css) replacing CloudScape inputs: DarkFormField, DarkInput, DarkAutosuggest, DarkSelect (with renderOption/renderValue support for color swatches), and DarkMultiselect -- all with filtering, keyboard navigation, loading/error states, and outside-click dismissal.
  • Rewrote all modals (ImageRequestModal, LoadDataModal, LoadImageModal) to use the new custom components with zero CloudScape imports.
  • Modernized alert components (CredsExpiredAlert, ImageRequestStatus) from CloudScape Alert wrappers to custom glass-morphism toast cards with color-coded status, animated spinners, and CSS-driven hover/transitions.
  • Deleted orphaned components (S3DataSelector, S3ImageSelector, LocalDataSelector, NewRequestButton) that were made redundant by the unified OsmlMenu panel.

OSML Menu Panel

  • New unified side panel (OsmlMenu.tsx / OsmlMenu.css) with a hamburger toggle button, animated panel open/close, action cards (Submit Request, Load GeoJSON, Load Image), and a grouped layer list with visibility/zoom/remove controls.
  • Resource management via new ResourceContext (ResourceContext.tsx) providing addResource, removeResource, toggleVisibility, zoomTo, and clearAll operations with proper Cesium viewer integration.
  • Color dot indicators on feature collection layers showing their results color.
  • Processing pulse ring on the toggle button when an image request is in-flight.
  • Layer list animations with staggered slide-in on panel open and entry animations when layers are added.

Cesium Viewer Enhancements

  • Hid all default Cesium widgets: geocoder, home button, scene mode picker, base layer picker, navigation help, fullscreen button, timeline, and animation.
  • Offline-first base layer: tries ArcGIS World Imagery on startup, falls back to the bundled Natural Earth II tiles if offline -- resolved before mounting the Viewer so the baseLayer prop is set once (no recreation warning).
  • Globe atmosphere & lighting: enabled showGroundAtmosphere, enableLighting, sky atmosphere, sun rendering, and subtle distance fog via an imperative viewer ref callback.
  • Viewport vignette: CSS radial gradient overlay on the viewer container for a cinematic framed look.
  • Cleaned up styles.css: removed ~100 lines of CloudScape override hacks.

Logo Polish

  • Repositioned from bottom-right to bottom-left.
  • Added fade-in + slide-up entrance animation on load.
  • Responsive sizing via clamp(40px, 6vh, 70px) instead of fixed 10vh.
  • Subtle opacity + scale hover effect with drop shadow.

Status Card Transitions

  • ImageRequestStatus rewritten with a dedicated CSS file (ImageRequestStatus.css).
  • Smooth fade + scale entrance/exit transitions (state-driven, not inline animation).
  • Animated dismiss with 200ms exit before state cleanup.
  • All hover handlers moved from inline JS to proper CSS classes.

Feature Popup Redesign

  • New FeaturePopup.tsx / FeaturePopup.css: a glass-morphism HTML overlay that replaces the old Cesium billboard + plain-text label.
    • Tracks the clicked feature's globe position in real-time via SceneTransforms.worldToWindowCoordinates on each preRender frame.
    • Grouped property sections (Classification, Location, Metadata, Details) with icons and styled key-value rows.
    • Nested property support: objects are expanded into collapsible indented sub-entries with chevron toggles, rather than flattened into comma-separated strings.
    • Arrays of objects are expanded into numbered children.
    • Scrollable body, Escape key dismissal, viewport-clamped positioning.
    • Text values are user-selectable for copying.
  • Refactored formatFeatureProperties in cesiumHelper.ts from returning a flat string to returning structured PropertyGroup[] data with recursive PropertyEntry objects (supporting children).
  • Click handler in cesiumHelper.ts now accepts an onFeatureClick callback threaded from App.tsx through OsmlTray -> OsmlMenu -> modals -> loadGeoJson/loadS3GeoJson. The billboard marker is kept; the Cesium label is removed.
  • Feature Classes special case now directly accesses iri/score properties from the object instead of regex-splitting a flattened string.

Color Swatch Previews

  • DarkSelect extended with renderOption and renderValue props.
  • Results Color selector in ImageRequestModal now shows a colored circle next to each color name in both the dropdown and the selected value.
  • Layer list items show a small color dot for feature collections.

Files Changed

Area Files
Design system DarkModal.tsx/css, FormControls.tsx/css (new)
Modals ImageRequestModal.tsx, LoadDataModal.tsx, LoadImageModal.tsx
Menu/panel OsmlMenu.tsx/css (new), OsmlTray.tsx
Alerts/status CredsExpiredAlert.tsx, ImageRequestStatus.tsx/css
Feature popup FeaturePopup.tsx/css (new), cesiumHelper.ts
App shell App.tsx, main.tsx, styles.css, Logo.css
State ResourceContext.tsx (new)
Deleted S3DataSelector, S3ImageSelector, LocalDataSelector, NewRequestButton
Dependencies package.json (-3 CloudScape packages)

Checklist

Before you submit a pull request, please make sure you have the following:

  • Code changes are compact and well-structured to facilitate easy review
  • Changes are documented in the README.md and other relevant documentation pages
  • PR title and description accurately reflect the changes and are detailed enough for historical tracking
  • PR contains tests that cover all new code and the code has been manual tested
  • All new dependencies are declared (if any), and no unnecessary libraries are added
  • Performance impacts (if any) of the changes are evaluated and documented
  • Security implications of the changes (if any) are reviewed and addressed
  • I have read the Contributing Guidelines and agree to follow the Code of Conduct

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Copy Markdown

@devinglauner devinglauner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@drduhe drduhe merged commit 3105e30 into main Feb 12, 2026
3 checks passed
@drduhe drduhe deleted the feat/update-ui branch February 12, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants