## Description
>
```
const isOnCanvas = matchBuilderPath(window.location.pathname);
if (isOnCanvas) {
dispatch(showDebuggerAction(!showDebugger));
}}
```
The condition check to verify if we are on canvas was removed as we are
opening debugger throughout all pages.
> Now debugger is accessible from all pages in Appsmith. (Earlier it was
not present in Datasources pages.)
Fixes #19567
#21935
#21934
#21907
#21223
Media
> [Video](https://www.loom.com/share/ff5eebb5e0a74e0bad6ead26050b5833)
## Type of change
> Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
- Manual
- Jest
- Cypress
### Test Plan
> Add Testsmith test cases links that relate to this PR
### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
110 lines
2.9 KiB
TypeScript
110 lines
2.9 KiB
TypeScript
import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants";
|
|
import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants";
|
|
import type { EventLocation } from "utils/AnalyticsUtil";
|
|
import type { SlashCommandPayload } from "entities/Action";
|
|
|
|
export const changeApi = (
|
|
id: string,
|
|
isSaas: boolean,
|
|
newApi?: boolean,
|
|
): ReduxAction<{ id: string; isSaas: boolean; newApi?: boolean }> => {
|
|
return {
|
|
type: ReduxActionTypes.API_PANE_CHANGE_API,
|
|
payload: { id, isSaas, newApi },
|
|
};
|
|
};
|
|
|
|
export const initApiPane = (urlId?: string): ReduxAction<{ id?: string }> => {
|
|
return {
|
|
type: ReduxActionTypes.INIT_API_PANE,
|
|
payload: { id: urlId },
|
|
};
|
|
};
|
|
|
|
export const setCurrentCategory = (
|
|
category: string,
|
|
): ReduxAction<{ category: string }> => {
|
|
return {
|
|
type: ReduxActionTypes.SET_CURRENT_CATEGORY,
|
|
payload: { category },
|
|
};
|
|
};
|
|
|
|
export const setLastUsedEditorPage = (
|
|
path: string,
|
|
): ReduxAction<{ path: string }> => {
|
|
return {
|
|
type: ReduxActionTypes.SET_LAST_USED_EDITOR_PAGE,
|
|
payload: { path },
|
|
};
|
|
};
|
|
|
|
export const setLastSelectedPage = (
|
|
selectedPageId: string,
|
|
): ReduxAction<{ selectedPageId: string }> => {
|
|
return {
|
|
type: ReduxActionTypes.SET_LAST_SELECTED_PAGE_PAGE,
|
|
payload: { selectedPageId },
|
|
};
|
|
};
|
|
|
|
export const createNewApiAction = (
|
|
pageId: string,
|
|
from: EventLocation,
|
|
apiType?: string,
|
|
): ReduxAction<{ pageId: string; from: EventLocation; apiType?: string }> => ({
|
|
type: ReduxActionTypes.CREATE_NEW_API_ACTION,
|
|
payload: { pageId, from, apiType },
|
|
});
|
|
|
|
export const createNewQueryAction = (
|
|
pageId: string,
|
|
from: EventLocation,
|
|
datasourceId: string,
|
|
): ReduxAction<{
|
|
pageId: string;
|
|
from: EventLocation;
|
|
datasourceId: string;
|
|
}> => ({
|
|
type: ReduxActionTypes.CREATE_NEW_QUERY_ACTION,
|
|
payload: { pageId, from, datasourceId },
|
|
});
|
|
|
|
export const updateBodyContentType = (
|
|
title: string,
|
|
apiId: string,
|
|
): ReduxAction<{ title: string; apiId: string }> => ({
|
|
type: ReduxActionTypes.UPDATE_API_ACTION_BODY_CONTENT_TYPE,
|
|
payload: { title, apiId },
|
|
});
|
|
|
|
export const redirectToNewIntegrations = (
|
|
pageId: string,
|
|
params?: any,
|
|
): ReduxAction<{
|
|
pageId: string;
|
|
params: any;
|
|
}> => ({
|
|
type: ReduxActionTypes.REDIRECT_TO_NEW_INTEGRATIONS,
|
|
payload: { pageId, params },
|
|
});
|
|
|
|
export const executeCommandAction = (payload: SlashCommandPayload) => ({
|
|
type: ReduxActionTypes.EXECUTE_COMMAND,
|
|
payload: payload,
|
|
});
|
|
|
|
export const setApiPaneConfigSelectedTabIndex: (
|
|
payload: number,
|
|
) => ReduxAction<{ selectedTabIndex: number }> = (payload: number) => ({
|
|
type: ReduxActionTypes.SET_API_PANE_CONFIG_SELECTED_TAB,
|
|
payload: { selectedTabIndex: payload },
|
|
});
|
|
|
|
export const setApiRightPaneSelectedTab: (
|
|
payload: number,
|
|
) => ReduxAction<{ selectedTab: number }> = (payload: number) => ({
|
|
type: ReduxActionTypes.SET_API_RIGHT_PANE_SELECTED_TAB,
|
|
payload: { selectedTab: payload },
|
|
});
|