Skip to content

v0.3.7

Choose a tag to compare

@github-actions github-actions released this 05 Dec 02:35
· 65 commits to main since this release
8df352f

🎯 Major Features

Universe Service Refactor

Complete architectural overhaul of the Universe service with separation of concerns into specialized sub-services:

  • ExtensionManager: Manages extension loading, engine instances, and lifecycle hooks
  • RegistryService: Fully dynamic, Map-based registry system for cross-engine resource sharing
  • MenuService: Dedicated menu item and panel management with event support
  • WidgetService: Dashboard widget registration and retrieval system
  • HookService: Application lifecycle hooks and custom event hooks

Key Benefits:

  • Improved performance with lazy loading and proper engine lifecycle management
  • Better separation of concerns and maintainability
  • Enhanced cross-engine resource sharing via Ember's application container
  • Backward compatibility maintained through facade pattern

Enhanced Extension System

New Extension Patterns:

  • extension.js hook patterns with setupExtension() and onEngineLoaded() support
  • whenEngineLoaded() utility method that handles both loaded and not-yet-loaded engines
  • Comprehensive extension checking methods: isInstalled(), isEngineLoaded(), isEngineLoading()
  • Automatic hook execution for router-loaded engines

Engine Loading Improvements:

  • Fixed race conditions between engine loading and hook registration
  • Proper tracking of router-loaded engines in loadedEngines Map
  • Patched buildChildEngineInstance to run hooks for router-loaded engines
  • Two-phase extension setup: registration first, then hook execution

Performance Optimizations:

  • extensions.json loading with localStorage caching
  • Reduced console noise by removing excessive debug logs
  • Performance monitoring for extension load times

Helper Registration System

  • Cross-engine helper sharing via application container
  • registerHelper() method for template helpers
  • Support for both class-based and function-based helpers
  • Automatic registration to application container for global access

Component Registration Enhancements

  • registerRenderableComponent() for cross-engine component sharing
  • Support for component classes via ExtensionComponent
  • Automatic component registration to engine containers
  • getRenderableComponents() for retrieving registered components

πŸ”§ API Improvements

UniverseService

  • getService() method with flexible naming pattern resolution:
    • Short names: "menu" β†’ universe/menu-service
    • Plural variations: "hooks" or "hook" β†’ universe/hook-service
    • CamelCase: "menuService" β†’ universe/menu-service
    • Full names: "menu-service" β†’ universe/menu-service
    • With namespace: "universe/menu-service" β†’ universe/menu-service
  • whenEngineLoaded() for simplified engine-dependent setup
  • getServiceFromEngine() for accessing engine-specific services
  • getApplicationInstance() with fallback to window.Fleetbase

MenuService

  • Computed getters for template access: headerMenuItems, adminMenuItems, adminMenuPanels
  • Event triggers for backward compatibility
  • Proper finalView normalization for all menu items
  • onClick handlers wrapped with menuItem and universe parameters
  • Fixed panel item slug/view structure to match original behavior

WidgetService

  • Per-dashboard widget registration
  • registerWidgets() for making widgets available on dashboards
  • registerDefaultWidgets() for auto-loading specific widgets
  • Proper widget filtering by dashboard ID

πŸ› Bug Fixes

Extension Loading

  • Fixed owner undefined errors during engine initialization
  • Resolved timeout errors during engine boot
  • Fixed duplicate dashboard ID errors
  • Corrected engine instance tracking and retrieval
  • Fixed race conditions in extension setup

Menu System

  • Fixed registry name mismatch for header menu items
  • Added missing properties to MenuItem (section, view, slug, etc.)
  • Corrected panel item structure for proper routing
  • Added null checks before dasherize calls
  • Fixed onClick handler parameter passing

Registry System

  • Fixed widget registry lookup to work with array storage
  • Proper filtering by registration key
  • Shared registries Map across all engines via container
  • Triggered reactivity when creating new registries

Service Resolution

  • Fixed service injection on engine boot
  • Corrected service map injection
  • Fixed virtualRouteRedirect and getViewFromTransition methods

πŸ“¦ Exports & Structure

  • Named exports on "exports" namespace
  • Separated default and named exports in app/exports re-exports

πŸ”„ ResourceActionService

  • Allow properties to be set from initialization options
  • Improved flexibility for service configuration

What's Changed

  • feat: Complete UniverseService Refactor - Service Decomposition & Lazy Loading by @roncodes in #67
  • v0.3.7 by @roncodes in #66

Full Changelog: v0.3.6...v0.3.7