chore: split for env walkthrough PR (#28806)
## Description PR to split code for env walkthrough. EE PR: [#2762](https://github.com/appsmithorg/appsmith-ee/pull/2762) Changes: - Update CSS for walkthrough section - Create new selector for permission checking #### PR fixes following issue(s) Fixes [#27335](https://github.com/appsmithorg/appsmith/issues/27335) #### 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 - [ ] My code follows the style guidelines of this project - [ ] 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 - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] 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 commit is contained in:
parent
169f4cca86
commit
ad88b65d95
|
|
@ -8,6 +8,9 @@ import { hasCreateDatasourcePermission as hasCreateDatasourcePermission_EE } fro
|
||||||
import { hasManageDatasourcePermission as hasManageDatasourcePermission_CE } from "ce/utils/permissionHelpers";
|
import { hasManageDatasourcePermission as hasManageDatasourcePermission_CE } from "ce/utils/permissionHelpers";
|
||||||
import { hasManageDatasourcePermission as hasManageDatasourcePermission_EE } from "@appsmith/utils/permissionHelpers";
|
import { hasManageDatasourcePermission as hasManageDatasourcePermission_EE } from "@appsmith/utils/permissionHelpers";
|
||||||
|
|
||||||
|
import { hasManageWorkspaceDatasourcePermission as hasManageWorkspaceDatasourcePermission_CE } from "ce/utils/permissionHelpers";
|
||||||
|
import { hasManageWorkspaceDatasourcePermission as hasManageWorkspaceDatasourcePermission_EE } from "@appsmith/utils/permissionHelpers";
|
||||||
|
|
||||||
import { hasDeleteDatasourcePermission as hasDeleteDatasourcePermission_CE } from "ce/utils/permissionHelpers";
|
import { hasDeleteDatasourcePermission as hasDeleteDatasourcePermission_CE } from "ce/utils/permissionHelpers";
|
||||||
import { hasDeleteDatasourcePermission as hasDeleteDatasourcePermission_EE } from "@appsmith/utils/permissionHelpers";
|
import { hasDeleteDatasourcePermission as hasDeleteDatasourcePermission_EE } from "@appsmith/utils/permissionHelpers";
|
||||||
|
|
||||||
|
|
@ -62,6 +65,14 @@ export const getHasManageDatasourcePermission = (
|
||||||
else return hasManageDatasourcePermission_CE(permissions);
|
else return hasManageDatasourcePermission_CE(permissions);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getHasManageWorkspaceDatasourcePermission = (
|
||||||
|
isEnabled: boolean,
|
||||||
|
permissions?: string[],
|
||||||
|
) => {
|
||||||
|
if (isEnabled) return hasManageWorkspaceDatasourcePermission_EE(permissions);
|
||||||
|
else return hasManageWorkspaceDatasourcePermission_CE(permissions);
|
||||||
|
};
|
||||||
|
|
||||||
export const getHasDeleteDatasourcePermission = (
|
export const getHasDeleteDatasourcePermission = (
|
||||||
isEnabled: boolean,
|
isEnabled: boolean,
|
||||||
permissions?: string[],
|
permissions?: string[],
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,10 @@ export const hasCreateDatasourcePermission = (_permissions?: string[]) => true;
|
||||||
|
|
||||||
export const hasManageDatasourcePermission = (_permissions?: string[]) => true;
|
export const hasManageDatasourcePermission = (_permissions?: string[]) => true;
|
||||||
|
|
||||||
|
export const hasManageWorkspaceDatasourcePermission = (
|
||||||
|
_permissions?: string[],
|
||||||
|
) => true;
|
||||||
|
|
||||||
export const hasDeleteDatasourcePermission = (_permissions?: string[]) => true;
|
export const hasDeleteDatasourcePermission = (_permissions?: string[]) => true;
|
||||||
|
|
||||||
export const hasCreateDatasourceActionPermission = (_permissions?: string[]) =>
|
export const hasCreateDatasourceActionPermission = (_permissions?: string[]) =>
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,11 @@ import AnalyticsUtil from "utils/AnalyticsUtil";
|
||||||
const CLIPID = "clip__feature";
|
const CLIPID = "clip__feature";
|
||||||
const Z_INDEX = 1000;
|
const Z_INDEX = 1000;
|
||||||
|
|
||||||
|
const WalkthroughDescription = styled(Text)`
|
||||||
|
// CSS to add new line for each \n in the description
|
||||||
|
white-space: pre-line;
|
||||||
|
`;
|
||||||
|
|
||||||
const WalkthroughWrapper = styled.div<{ overlayColor?: string }>`
|
const WalkthroughWrapper = styled.div<{ overlayColor?: string }>`
|
||||||
left: 0px;
|
left: 0px;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
|
|
@ -304,7 +309,7 @@ const InstructionsComponent = ({
|
||||||
size="md"
|
size="md"
|
||||||
/>
|
/>
|
||||||
</InstructionsHeaderWrapper>
|
</InstructionsHeaderWrapper>
|
||||||
<Text>{details.description}</Text>
|
<WalkthroughDescription>{details.description}</WalkthroughDescription>
|
||||||
{details.imageURL && (
|
{details.imageURL && (
|
||||||
<ImageWrapper>
|
<ImageWrapper>
|
||||||
<img src={details.imageURL} />
|
<img src={details.imageURL} />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user