-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Update the old Toolbar and redesign implementation to follow the new modular approach. It creates a toolbar at the IDE level and uses that in the PluginActionToolbar. It allows extension for other components. Unblocks #35528 ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a customizable toolbar for plugin actions, enhancing user interface interaction. - Added a new plugin action editor interface to manage plugin actions dynamically. - Implemented a context provider for managing plugin actions throughout the application. - Added a feature flag for conditional rendering of the new plugin action editor interface. - **Bug Fixes** - Removed obsolete action redesign features, streamlining the user experience. - **Documentation** - Added index files for better modularity and reusability of components related to plugin actions. - Minor formatting updates for improved code clarity in the Plugin Action Editor. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
7 changed files
with
98 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from "react"; | ||
import { Flex } from "@appsmith/ads"; | ||
|
||
interface ToolbarProps { | ||
children?: React.ReactNode[] | React.ReactNode; | ||
} | ||
|
||
const Toolbar = (props: ToolbarProps) => { | ||
return ( | ||
<Flex | ||
alignItems="center" | ||
borderBottom="1px solid var(--ads-v2-color-border-muted);" | ||
flexDirection="row" | ||
height="32px" | ||
justifyContent="space-between" | ||
padding="spaces-2" | ||
> | ||
{props.children} | ||
</Flex> | ||
); | ||
}; | ||
|
||
const Left = (props: ToolbarProps) => { | ||
return ( | ||
<Flex | ||
alignItems="center" | ||
flexDirection="row" | ||
gap="spaces-2" | ||
justifySelf="flex-start" | ||
> | ||
{props.children} | ||
</Flex> | ||
); | ||
}; | ||
|
||
const Right = (props: ToolbarProps) => { | ||
return ( | ||
<Flex | ||
alignItems="center" | ||
flexDirection="row" | ||
gap="spaces-2" | ||
justifySelf="flex-end" | ||
> | ||
{props.children} | ||
</Flex> | ||
); | ||
}; | ||
|
||
Toolbar.Left = Left; | ||
Toolbar.Right = Right; | ||
|
||
export default Toolbar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 38 additions & 2 deletions
40
app/client/src/PluginActionEditor/components/PluginActionToolbar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,43 @@ | ||
import React from "react"; | ||
import { IDEToolbar } from "IDE"; | ||
import { Button, Tooltip } from "@appsmith/ads"; | ||
import { modText } from "../../utils/helpers"; | ||
|
||
const PluginActionToolbar = () => { | ||
return <div />; | ||
interface PluginActionToolbarProps { | ||
runOptions?: React.ReactNode; | ||
children?: React.ReactNode[] | React.ReactNode; | ||
} | ||
|
||
const PluginActionToolbar = (props: PluginActionToolbarProps) => { | ||
return ( | ||
<IDEToolbar> | ||
<IDEToolbar.Left>{props.children}</IDEToolbar.Left> | ||
<IDEToolbar.Right> | ||
{props.runOptions} | ||
<Tooltip | ||
content={modText() + " ⏎"} | ||
placement="topRight" | ||
showArrow={false} | ||
> | ||
<Button kind="primary" size="sm"> | ||
Run | ||
</Button> | ||
</Tooltip> | ||
<Button | ||
isIconButton | ||
kind="secondary" | ||
size="sm" | ||
startIcon="settings-2-line" | ||
/> | ||
<Button | ||
isIconButton | ||
kind="tertiary" | ||
size="sm" | ||
startIcon="more-2-fill" | ||
/> | ||
</IDEToolbar.Right> | ||
</IDEToolbar> | ||
); | ||
}; | ||
|
||
export default PluginActionToolbar; |
54 changes: 0 additions & 54 deletions
54
app/client/src/pages/Editor/IDE/EditorPane/components/ActionDrawer.tsx
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
app/client/src/pages/Editor/IDE/EditorPane/components/ActionEditor.tsx
This file was deleted.
Oops, something went wrong.
73 changes: 0 additions & 73 deletions
73
app/client/src/pages/Editor/IDE/EditorPane/components/ActionToolbar.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters