PromucFlow_constructor/app/client/src/selectors
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
..
actionSelectors.tsx chore: remove xml parser v3 as a default library (#28012) 2023-10-20 11:08:47 +05:30
activeEditorFieldSelectors.ts chore: Refactor debugger analytics for active fields (#28036) 2023-10-16 09:22:11 +05:30
analyticsSelectors.tsx chore: Removing feature flag for app level invites (#22650) 2023-04-26 12:48:16 +05:30
apiPaneSelectors.ts chore: Debugger Split states (#31043) 2024-02-29 11:53:57 +05:30
appCollabSelectors.tsx chore: Clean up unused and completed feature flags (#23062) 2023-05-25 10:58:41 +05:30
appSettingsPaneSelectors.tsx chore: Make App Sidebar Generally Available (#30923) 2024-02-07 11:25:23 +05:30
appThemingSelectors.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
appViewSelectors.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
authSelectors.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
autoHeightSelectors.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
autoLayoutSelectors.tsx chore: Create layout system structure for Anvil and AnvilFlexComponent. (#27178) 2023-10-02 15:41:05 -04:00
buildingBlocksSelectors.ts feat: implement dropping building blocks on canvas (#31857) 2024-04-16 09:41:09 +01:00
canvasSelectors.ts feat: added anvil type for app layout (#27633) 2023-10-04 14:24:16 +05:30
crudInfoModalSelectors.ts chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
datasourceSelectors.ts chore: [App Sidebar] Data Pane (#28248) 2023-10-24 15:28:21 +05:30
dataTreeSelectors.ts feat: workflow js run on browser (#31106) 2024-02-26 21:14:35 +05:30
debuggerSelectors.test.ts chore: Import debugger fixes (#31080) 2024-02-14 12:00:18 +05:30
debuggerSelectors.tsx chore: Debugger Split states (#31043) 2024-02-29 11:53:57 +05:30
editorContextSelectors.ts chore: Splitting uiReducers to support modules on EE (#27580) 2023-09-25 10:23:01 +05:30
editorSelectors.tsx chore: Merge wds and anvil feature flags (#32609) 2024-04-12 22:54:04 +05:30
errorSelectors.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
explorerSelector.ts chore: Splitting uiReducers to support modules on EE (#27580) 2023-09-25 10:23:01 +05:30
flattenedChildCanvasSelector.ts chore: Layout system wise restructuring of Canvas Widget (#27496) 2023-10-04 17:23:29 +05:30
focusHistorySelectors.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
formSelectors.ts chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
gitSyncSelectors.tsx fix: adding branch protection callout (#32707) 2024-04-18 15:13:51 +05:30
globalSearchSelectors.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
helpSelectors.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
ideSelectors.tsx chore: Make pages section into a dropdown (#32486) 2024-04-18 16:04:38 +05:30
jsPaneSelectors.ts feat: revamped logic for tabs removal and action/JS deletion (#32690) 2024-04-19 12:19:24 +05:30
layoutSystemSelectors.ts feat: implement dropping building blocks on canvas (#31857) 2024-04-16 09:41:09 +01:00
lintingSelectors.ts feat: show lint errors in async functions bound to sync fields (#21187) 2023-04-03 16:11:15 +05:30
mainCanvasSelectors.tsx feat: Add widget responsiveness and conversion algorithm (#21386) 2023-04-07 09:51:35 -04:00
navigationSelectors.ts chore: split for overlay changes on EE to accommodate module instance (#29647) 2023-12-18 12:42:36 +05:30
onboardingSelectors.tsx fix: Remove guided tour code (#30387) 2024-01-24 16:31:21 +05:30
oneClickBindingSelectors.tsx chore: Add analytics event to track telemetry is disabled & update properties for INVITE_USER event (#24042) 2023-06-06 02:57:40 +05:30
pageListSelectors.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
pageSelectors.tsx feat: dsl migration with server (#28518) 2023-11-30 18:03:33 +05:30
propertyPaneSelectors.tsx fix: action selector create flow (#32326) 2024-04-05 11:28:47 +05:30
queryPaneSelectors.ts feat: revamped logic for tabs removal and action/JS deletion (#32690) 2024-04-19 12:19:24 +05:30
settingsSelectors.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
tableFilterSelectors.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
templatesSelectors.tsx feat: implement dropping building blocks on canvas (#31857) 2024-04-16 09:41:09 +01:00
themeSelectors.tsx chore: update eslint and dependencies then fix revealed errors (#27908) 2023-10-11 10:14:38 +03:00
tourSelectors.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
ui.tsx chore: Block Selections when Canvas is in Side by Side mode (#31587) 2024-03-13 11:53:49 +05:30
usersSelectors.tsx feat: make features call a blocking API call for page load (#27974) 2023-10-11 23:19:19 +05:30
websocketSelectors.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
widgetDragSelectors.ts chore: Block Selections when Canvas is in Side by Side mode (#31587) 2024-03-13 11:53:49 +05:30
widgetEnhancementSelectors.ts chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
widgetReflowSelectors.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
widgetSelectors.test.tsx
widgetSelectors.ts chore: Merge wds and anvil feature flags (#32609) 2024-04-12 22:54:04 +05:30