Commit b4d5685
authored
feat: integrates on page unload behavior with backend for deployed mode of the app (#41036)
## Description
**TLDR:** Adds support for executing page unload actions during
navigation in deployed mode, refactors related components, and improves
action handling.
<ins>Problem</ins>
Page unload actions were not triggered during navigation in deployed
mode, leading to incomplete workflows especially for cleanup.
<ins>Root cause</ins>
The application lacked integration for executing unload actions on page
transitions, and related components did not properly handle navigation
or action execution.
<ins>Solution</ins>
This PR handles the integration of page unload action execution during
navigation in deployed mode. It introduces selectors for unload actions,
refactors the MenuItem component for better navigation handling, and
improves the PluginActionSaga for executing plugin actions. Unused
parameters and functions are removed for clarity and maintainability.
Fixes #40997
_or_
Fixes `Issue URL`
> [!WARNING]
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._
## Automation
/ok-to-test tags="@tag.All"
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/16021075820>
> Commit: f09e3c4
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=16021075820&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Wed, 02 Jul 2025 10:21:00 UTC
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added support for actions that execute automatically when navigating
away from a page.
* Introduced new navigation logic and hooks for consistent page
transitions within the app.
* Added new menu and dropdown components for improved navigation UI.
* **Bug Fixes**
* Updated navigation item styling and active state detection for
improved accuracy.
* **Tests**
* Added comprehensive tests for navigation sagas and page unload
actions.
* Added unit tests for navigation menu components.
* **Chores**
* Refactored and centralized navigation logic for maintainability.
* Improved type safety and selector usage in navigation and action
execution.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 481988d commit b4d5685
File tree
19 files changed
+1550
-94
lines changed- app/client
- cypress/support/Pages/AppSettings
- src
- actions
- ce/constants
- entities/Action
- sagas
- ActionExecution
- __tests__
- selectors
19 files changed
+1550
-94
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
696 | 697 | | |
697 | 698 | | |
698 | 699 | | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
| 623 | + | |
623 | 624 | | |
624 | 625 | | |
625 | 626 | | |
| |||
731 | 732 | | |
732 | 733 | | |
733 | 734 | | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
734 | 738 | | |
735 | 739 | | |
736 | 740 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
0 commit comments