## Description This PR introduces a new way to edit the queries directly from slash hint commands that edit button appears on hover of the hint. This also introduces an event `EDIT_ACTION_CLICK` as emitted from different other places of our application with all the similar properties except the `from` : `SlashCommandHint` <img width="566" alt="Screenshot 2024-03-27 at 12 45 09 AM" src="https://github.com/appsmithorg/appsmith/assets/7565635/34f0e226-d45a-482b-8484-7e1fdc672a04"> Fixes #32075 _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 --> > [!IMPORTANT] > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/8465758601> > Commit: `cff14b0006441274e182d17ff66603219971ddbd` > Cypress dashboard url: <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8465758601&attempt=2" target="_blank">Click here!</a> > All cypress tests have passed 🎉🎉🎉 <!-- end of auto-generated comment: Cypress test results --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced the code editor with improved command suggestions and quick command generation, including URL and event parameter handling. - Introduced new styling for command suggestions in the code editor. - **Refactor** - Updated functions and components for better handling and mapping of plugins within the code editor. - **Chores** - Added necessary imports and updated the usage of various components and utilities to support new features and improvements. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: “sneha122” <“sneha@appsmith.com”>
29 lines
1.0 KiB
TypeScript
29 lines
1.0 KiB
TypeScript
// Leaving this require here. Importing causes type mismatches which have not been resolved by including the typings or any other means. Ref: https://github.com/remix-run/history/issues/802
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
const createHistory = require("history").createBrowserHistory;
|
|
import type { History } from "history";
|
|
|
|
const history: History<AppsmithLocationState> = createHistory();
|
|
export default history;
|
|
|
|
export enum NavigationMethod {
|
|
CommandClick = "CommandClick",
|
|
EntityExplorer = "EntityExplorer",
|
|
Omnibar = "Omnibar",
|
|
Debugger = "Debugger",
|
|
CanvasClick = "CanvasClick",
|
|
ActionBackButton = "ActionBackButton",
|
|
ContextSwitching = "ContextSwitching",
|
|
AppSidebar = "AppSidebar",
|
|
AppNavigation = "AppNavigation",
|
|
PackageSidebar = "PackageSidebar",
|
|
SegmentControl = "SegmentControl",
|
|
EditorTabs = "EditorTabs",
|
|
WorkflowSidebar = "WorkflowSidebar",
|
|
SlashCommandHint = "SlashCommandHint",
|
|
}
|
|
|
|
export interface AppsmithLocationState {
|
|
invokedBy?: NavigationMethod;
|
|
}
|