-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36608 from appsmithorg/release
30/09 Daily Promotion
- Loading branch information
Showing
24 changed files
with
510 additions
and
116 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
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
5 changes: 2 additions & 3 deletions
5
app/client/cypress/e2e/Regression/ClientSide/Git/GitAutocommit_spec.ts
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
81 changes: 81 additions & 0 deletions
81
app/client/src/PluginActionEditor/components/PluginActionNameEditor.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 |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import React from "react"; | ||
import { useSelector } from "react-redux"; | ||
import ActionNameEditor from "components/editorComponents/ActionNameEditor"; | ||
import { usePluginActionContext } from "PluginActionEditor/PluginActionContext"; | ||
import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; | ||
import { getHasManageActionPermission } from "ee/utils/BusinessFeatures/permissionPageHelpers"; | ||
import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; | ||
import { PluginType } from "entities/Action"; | ||
import type { ReduxAction } from "ee/constants/ReduxActionConstants"; | ||
import styled from "styled-components"; | ||
import { getSavingStatusForActionName } from "selectors/actionSelectors"; | ||
import { getAssetUrl } from "ee/utils/airgapHelpers"; | ||
import { ActionUrlIcon } from "pages/Editor/Explorer/ExplorerIcons"; | ||
|
||
export interface SaveActionNameParams { | ||
id: string; | ||
name: string; | ||
} | ||
|
||
export interface PluginActionNameEditorProps { | ||
saveActionName: ( | ||
params: SaveActionNameParams, | ||
) => ReduxAction<SaveActionNameParams>; | ||
} | ||
|
||
const ActionNameEditorWrapper = styled.div` | ||
& .ads-v2-box { | ||
gap: var(--ads-v2-spaces-2); | ||
} | ||
&& .t--action-name-edit-field { | ||
font-size: 12px; | ||
.bp3-editable-text-content { | ||
height: unset !important; | ||
line-height: unset !important; | ||
} | ||
} | ||
& .t--plugin-icon-box { | ||
height: 12px; | ||
width: 12px; | ||
img { | ||
width: 12px; | ||
height: auto; | ||
} | ||
} | ||
`; | ||
|
||
const PluginActionNameEditor = (props: PluginActionNameEditorProps) => { | ||
const { action, plugin } = usePluginActionContext(); | ||
|
||
const isFeatureEnabled = useFeatureFlag(FEATURE_FLAG.license_gac_enabled); | ||
const isChangePermitted = getHasManageActionPermission( | ||
isFeatureEnabled, | ||
action?.userPermissions, | ||
); | ||
|
||
const saveStatus = useSelector((state) => | ||
getSavingStatusForActionName(state, action?.id || ""), | ||
); | ||
|
||
const iconUrl = getAssetUrl(plugin?.iconLocation) || ""; | ||
const icon = ActionUrlIcon(iconUrl); | ||
|
||
return ( | ||
<ActionNameEditorWrapper> | ||
<ActionNameEditor | ||
actionConfig={action} | ||
disabled={!isChangePermitted} | ||
enableFontStyling={plugin?.type === PluginType.API} | ||
icon={icon} | ||
saveActionName={props.saveActionName} | ||
saveStatus={saveStatus} | ||
/> | ||
</ActionNameEditorWrapper> | ||
); | ||
}; | ||
|
||
export default PluginActionNameEditor; |
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
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
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
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
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
Oops, something went wrong.