Skip to content

Issue 2037 - enhanced loading screen#2173

Merged
rmroot merged 10 commits intodevelopfrom
issue-2037
Dec 30, 2025
Merged

Issue 2037 - enhanced loading screen#2173
rmroot merged 10 commits intodevelopfrom
issue-2037

Conversation

@jamlokim
Copy link
Copy Markdown
Contributor

@jamlokim jamlokim commented Dec 4, 2025

connects #2037

This pull request introduces a major refactor and enhancement of the application's loading feedback system, shifting from simple loading messages to a more robust, multi-step loading modal with improved user navigation and error handling. The changes also streamline backup import/export workflows and provide clearer status updates to users.

Loading Modal & Feedback System Enhancements:

  • Added a new loading modal UI (loading.component.html, loading.component.css) that displays a title, a list of loading steps with progress indicators, and a "Done" button for user-driven navigation after completion.
  • Refactored LoadingService to support multiple loading messages, titles, step indices, completion status, context-based navigation, and clearing/resetting of loading states.
  • Updated LoadingComponent to subscribe to new loading service observables and trigger navigation or state reset when loading completes.

Backup Import/Export Workflow Improvements:

  • Modified backup import and export flows to use the new loading modal, including step-based progress messages, context-aware navigation, and improved error handling with toast notifications.
  • Changed calls to importAccountBackupFile and importFacilityBackupFile to include an additional argument for context or index tracking.
  • Added context-driven navigation after loading for importing backups and exporting facilities, with toast notifications triggered on completion or error.

General UI and Error Handling Improvements:

  • Replaced previous loading message and status calls with context, title, and step-based updates throughout the affected components (home-page, electron-backup-file, import-backup-modal, manage-accounts).
  • Implemented improved error handling and user feedback via toast notifications on backup import/export failures.

Code Maintenance and Subscription Management:

  • Added proper subscription management (ngOnDestroy) in modal components to prevent memory leaks with new loading service observables.
  • Minor additions to component state for context tracking (e.g., selected account in manage-accounts).

These changes provide a more informative and user-friendly experience during long-running operations such as importing backups or exporting data, and lay the groundwork for further enhancements to application feedback and navigation flows.

@jamlokim jamlokim requested a review from rmroot December 16, 2025 15:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements an enhanced loading feedback system that replaces simple loading spinners with a multi-step loading modal displaying progress indicators for long-running operations. The changes address issue #2037 by providing users with detailed visibility into operation progress, though the ability to cancel operations is not yet implemented.

Key Changes:

  • Introduced a new step-based loading modal UI with progress indicators (check marks for completed steps, spinners for current step, and completion buttons)
  • Refactored LoadingService to support multiple loading messages, titles, step indices, completion status, and context-based navigation
  • Updated backup import/export, data submission, facility deletion, and weather predictor update flows to use the new loading modal with granular progress tracking

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
loading.service.ts Added new observables and methods for managing multi-step loading (messages array, title, context, current index, completion status, navigation triggers)
loading.component.ts Updated to subscribe to new loading observables and trigger navigation on modal close
loading.component.html Implemented new modal UI with step list, progress icons, and "Done" button
loading.component.css Added styles for the new loading modal, message container, and icons
backup-data.service.ts Modified import methods to accept currIdx parameter and add loading messages at each step
export-to-excel-template-v3.service.ts Updated to add loading messages for each export step with proper indexing
weather-predictor-management.service.ts Refactored to use new loading system with step-by-step progress tracking
db-changes.service.ts Updated deleteFacility to use new loading modal with progress steps
upload-data.service.ts Modified submit method to use new loading system and move navigation to separate method
submit-import-data.component.ts Added subscription to navigationAfterLoading for post-completion handling
data-management-home.component.ts Added subscription to show toast after weather predictor updates complete
facilities-list.component.ts Added subscription to show toast after facility deletion completes
facility-settings.component.ts Added subscription to show toast and navigate after facility deletion
manage-accounts.component.ts Updated export flow to use new loading system with toast notification on completion
import-backup-modal.component.ts Updated to use new loading system and handle navigation after import completes
home-page.component.ts Updated example data loading to use new loading system
electron-backup-file.component.ts Updated to set context and title for loading operations
Comments suppressed due to low confidence (3)

src/app/shared/helper-services/backup-data.service.ts:185

  • Avoid automated semicolon insertion (98% of all statements in the enclosing function have an explicit semicolon).
    }

src/app/shared/helper-services/backup-data.service.ts:452

  • Avoid automated semicolon insertion (98% of all statements in the enclosing function have an explicit semicolon).
        }

src/app/shared/helper-services/backup-data.service.ts:462

  • Avoid automated semicolon insertion (98% of all statements in the enclosing function have an explicit semicolon).
          })

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@rmroot rmroot left a comment

Choose a reason for hiding this comment

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

Image

Code is looking good. there's some strange behavior going on. The analysis items when deleting a facility are getting 1/2 and 0/2 (above screenshot).

Also, when clicking the "Export Account Utility Data" button from the home screen, it seems to just hang and then once it's done the screen shows up.

Please look into those two things.

Additional ask that can be a new issue, would it be possible to list all the steps at the start and check them off as they are completed. I am assuming this will be a bigger lift so can be new part 2 issue.

@rmroot rmroot merged commit 5f4287c into develop Dec 30, 2025
3 checks passed
@jamlokim jamlokim deleted the issue-2037 branch January 12, 2026 16:08
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.

3 participants