PromucFlow_constructor/app/client
albinAppsmith 5a671807a3
feat: revamped logic for tabs removal and action/JS deletion (#32690)
## Description

This PR has changed the logic of next item selection after deleting an
item or removing a tab.
The new logic is
1. If there is no more tabs left after removal of current item, navigate
to first item from all items list
2. If all items list is empty, navigate to add
3. If the removed tab is not currently selected, no redirection required
just close the tab
4. If removed tab is in 0th position, redirect to current tab + 1
5. if removed tab is not in 0th position, redirect to tab - 1

Fixes #32634  

## Automation

/ok-to-test tags="@tag.Sanity, @tag.IDE"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]
> 🔴 🔴 🔴 Some tests have failed.
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8748435770>
> Commit: e3e9b51cc9a708fadf4d1b9f0e426b63e9f3c10a
> Cypress dashboard: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8748435770&attempt=2&selectiontype=test&testsstatus=failed&specsstatus=fail"
target="_blank"> Click here!</a>
> The following are new failures, please fix them before merging the PR:
<ol>
> <li>cypress/e2e/Regression/ClientSide/ExplorerTests/Hide_Page_spec.js
> <li>cypress/e2e/Regression/ClientSide/ExplorerTests/Page_Load_Spec.js
</ol>
> To know the list of identified flaky tests - <a
href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master"
target="_blank">Refer here</a>

<!-- end of auto-generated comment: Cypress test results  -->








<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Improved the closing functionality for JavaScript and query action
tabs in the IDE, enhancing user experience with smoother tab management.

- **Refactor**
- Aligned sagas and reducers with new action types for improved handling
of tab closures and entity redirects within the IDE.

- **Tests**
- Updated test cases to reflect changes in IDE saga functions and logic,
ensuring reliability and consistency in behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-19 12:19:24 +05:30
..
.husky
.yarn
cypress feat: revamped logic for tabs removal and action/JS deletion (#32690) 2024-04-19 12:19:24 +05:30
docker/templates chore: Fix bugs in logic for capturing web vitals for client (#32371) 2024-04-09 14:25:46 +05:30
generators chore: custom widget (#28926) 2023-12-28 12:16:28 +05:30
packages fix: Heading widget alignment does not follow user setting (#32759) 2024-04-18 12:03:20 +03:00
perf
public chore: Local Caddy support (#31325) 2024-04-19 06:38:01 +05:30
src feat: revamped logic for tabs removal and action/JS deletion (#32690) 2024-04-19 12:19:24 +05:30
test fix: reverting the default port numbers for the datasources (#32726) 2024-04-17 13:44:18 +05:30
typings
.babelrc
.dockerignore
.editorconfig
.eslintrc.base.json fix: add testing library eslint rules (#31028) 2024-02-12 18:59:10 +03:00
.eslintrc.js fix: add testing library eslint rules (#31028) 2024-02-12 18:59:10 +03:00
.fork-ts-checkerrc fix: OOM issue (#31995) 2024-03-21 22:08:58 +05:30
.gitignore chore: Local Caddy support (#31325) 2024-04-19 06:38:01 +05:30
.lintstagedrc.json
.nvmrc chore: update node version and appropriate git workflows (#31486) 2024-03-26 14:12:11 +03:00
.prettierignore
.prettierrc
.sentryclirc
.yarnrc.yml
build.sh chore: include client build source map (#30664) 2024-02-26 15:30:36 +05:30
craco.build.config.js
craco.common.config.js chore: add node variable for ts type checking (#31996) 2024-03-25 13:11:53 +03:00
craco.dev.config.js fix: Client development build performance (#31390) 2024-03-04 10:52:06 +03:00
cypress_ci_custom.config.ts
cypress_ci_hosted.config.ts
cypress_ci.config.ts
cypress-add-tags.js
cypress.config.ts
download-assets.js
jest.config.js chore: Fix bugs in logic for capturing web vitals for client (#32371) 2024-04-09 14:25:46 +05:30
package.json chore: Make pages section into a dropdown (#32486) 2024-04-18 16:04:38 +05:30
README.md
README.old.md
start-caddy.sh chore: Local Caddy support (#31325) 2024-04-19 06:38:01 +05:30
start-https.sh chore: Local Caddy support (#31325) 2024-04-19 06:38:01 +05:30
tailwind.config.js
tsconfig.json fix: Client development build performance (#31390) 2024-03-04 10:52:06 +03:00
tsconfig.path.json
vercel.json
yarn.lock chore: Make pages section into a dropdown (#32486) 2024-04-18 16:04:38 +05:30

Appsmith Client

This project was bootstrapped with Create React App.

For details on setting up your development machine, please refer to the Setup Guide