## Description Before, when use clicks on new query from action selector, omnibar used to show to create a new query. This PR removed showing omnibar and instead will start showing a modal with similar content as add pane. #### PR fixes following issue(s) Fixes https://github.com/appsmithorg/appsmith/issues/31217 #### Media Before https://github.com/appsmithorg/appsmith/assets/87797149/641a1409-bc9c-42be-907f-02157faf901e After https://github.com/appsmithorg/appsmith/assets/87797149/c1ee3d29-1fef-4de2-8c34-3e2bedc4081f #### Type of change - New feature (non-breaking change which adds functionality) ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [ ] 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 - [ ] 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 - [ ] 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: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new modal for creating items, enhancing user interaction and productivity. - Added omnibar trigger sources to refine search functionalities based on the context of use. - Implemented a function to dynamically generate messages for creating new items, improving user guidance. - **Enhancements** - Enhanced the global search by including additional trigger sources, allowing for more precise search operations. - Improved the property pane with a toggle for a new creation modal, streamlining the process of adding new items. - **Refactor** - Optimized query list item creation and management within the editor, ensuring a smoother user experience. - Refined action dispatch mechanisms to better support side-by-side editing modes. - **UI Improvements** - Updated the UI to include a new create new modal, making it easier for users to add queries and other items. - Enhanced search results handling to better accommodate different trigger sources and editor modes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
106 lines
2.3 KiB
TypeScript
106 lines
2.3 KiB
TypeScript
import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants";
|
|
import type { SelectedPropertyPanel } from "reducers/uiReducers/propertyPaneReducer";
|
|
|
|
export const updateWidgetName = (widgetId: string, newName: string) => {
|
|
return {
|
|
type: ReduxActionTypes.UPDATE_WIDGET_NAME_INIT,
|
|
payload: {
|
|
id: widgetId,
|
|
newName,
|
|
},
|
|
};
|
|
};
|
|
|
|
export const bindDataToWidget = (payload: {
|
|
widgetId: string;
|
|
bindingQuery?: string;
|
|
}) => {
|
|
return {
|
|
type: ReduxActionTypes.BIND_DATA_TO_WIDGET,
|
|
payload,
|
|
};
|
|
};
|
|
|
|
export const setSnipingMode = (payload: {
|
|
isActive: boolean;
|
|
bindTo?: string;
|
|
}) => ({
|
|
type: ReduxActionTypes.SET_SNIPING_MODE,
|
|
payload,
|
|
});
|
|
|
|
export const resetSnipingMode = () => ({
|
|
type: ReduxActionTypes.RESET_SNIPING_MODE,
|
|
});
|
|
|
|
export const setPropertyPaneWidthAction = (width: number) => ({
|
|
type: ReduxActionTypes.SET_PROPERTY_PANE_WIDTH,
|
|
payload: width,
|
|
});
|
|
|
|
export const setPropertySectionState = (
|
|
key: string,
|
|
isOpen: boolean,
|
|
panelPropertyPath?: string,
|
|
) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_PROPERTY_SECTION_STATE,
|
|
payload: { key, isOpen, panelPropertyPath },
|
|
};
|
|
};
|
|
export const setAllPropertySectionState = (payload: {
|
|
[key: string]: boolean;
|
|
}) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_ALL_PROPERTY_SECTION_STATE,
|
|
payload,
|
|
};
|
|
};
|
|
export const setSelectedPropertyTabIndex = (selectedIndex: number) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_SELECTED_PROPERTY_TAB_INDEX,
|
|
payload: selectedIndex,
|
|
};
|
|
};
|
|
|
|
export const setFocusablePropertyPaneField = (path?: string) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_FOCUSABLE_PROPERTY_FIELD,
|
|
payload: { path },
|
|
};
|
|
};
|
|
|
|
export const setSelectedPropertyPanel = (
|
|
path: string | undefined,
|
|
index: number,
|
|
) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_SELECTED_PANEL_PROPERTY,
|
|
payload: {
|
|
path,
|
|
index,
|
|
},
|
|
};
|
|
};
|
|
|
|
export const unsetSelectedPropertyPanel = (path: string | undefined) => {
|
|
return {
|
|
type: ReduxActionTypes.UNSET_SELECTED_PANEL_PROPERTY,
|
|
payload: path,
|
|
};
|
|
};
|
|
|
|
export const setSelectedPropertyPanels = (payload: SelectedPropertyPanel) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_SELECTED_PANELS,
|
|
payload,
|
|
};
|
|
};
|
|
|
|
export const setShowCreateNewModal = (payload: boolean) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_SHOW_CREATE_NEW_MODAL,
|
|
payload,
|
|
};
|
|
};
|