feat: UI updates for the Alert Message pop-up when a user attempts to navigate to another page while a plan is in progress. #557
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request introduces a robust mechanism to prevent accidental cancellation of active plans when users attempt to navigate away from a plan in progress. It adds a confirmation dialog, refactors navigation logic to support cancellation protection, and applies consistent styling improvements across the panel components.
Plan cancellation protection and navigation logic:
PlanCancellationDialogcomponent to prompt users for confirmation before cancelling an active plan when navigating away.usePlanCancellationAlertto encapsulate the logic for detecting active plans and handling cancellation confirmation, including API calls and error handling.PlanPage.tsxandPlanPanelLeft.tsxto use the new cancellation protection logic, ensuring all navigations that could interrupt an active plan trigger the confirmation dialog. [1] [2] [3] [4]Panel and UI improvements:
Prop and type updates:
PlanPanelLefPropsand related components to accept a newonNavigationWithAlertprop, enabling navigation protection throughout the panel. [1] [2]These changes significantly improve user experience by preventing accidental loss of work during active plans and modernizing the panel UI for better maintainability and accessibility.
Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information