Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags";
import {
dataSources,
deployMode,
Expand All @@ -23,6 +24,13 @@ describe(
function () {
let pluginName = "Google Sheets";

before(() => {
// intercept features call gsheet all sheets disabled
featureFlagIntercept({
release_gs_all_sheets_options_enabled: false,
});
});

it("1. Verify GSheets dropdown options", function () {
dataSources.NavigateToDSCreateNew();
dataSources.CreatePlugIn("Google Sheets");
Expand Down
2 changes: 2 additions & 0 deletions app/client/cypress/support/Pages/IDE/BottomTabs/Response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Response {
}

public openResponseTypeMenu() {
this.switchToResponseTab();
cy.get(this.locators.responseDataContainer).realHover();
cy.get(this.locators.responseTypeMenuTrigger).click({ force: true });
}
Expand All @@ -46,6 +47,7 @@ class Response {
}

public validateResponseStatus(status: string): void {
this.switchToResponseTab();
cy.get(this.locators.responseStatusInfo).trigger("mouseover");
cy.get(this.locators.responseStatusInfoTooltip).should(
"include.text",
Expand Down
3 changes: 3 additions & 0 deletions app/client/src/ce/entities/FeatureFlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export const FEATURE_FLAG = {
release_evaluation_scope_cache: "release_evaluation_scope_cache",
release_table_html_column_type_enabled:
"release_table_html_column_type_enabled",
release_gs_all_sheets_options_enabled:
"release_gs_all_sheets_options_enabled",
} as const;

export type FeatureFlag = keyof typeof FEATURE_FLAG;
Expand Down Expand Up @@ -86,6 +88,7 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = {
ab_request_new_integration_enabled: false,
release_evaluation_scope_cache: false,
release_table_html_column_type_enabled: false,
release_gs_all_sheets_options_enabled: false,
};

export const AB_TESTING_EVENT_KEYS = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ function renderComponent(props: renderComponentProps) {
};

const options = props.options || [];
const defaultValue = props.initialValue as string;
const selectedValue = props.input?.value;
const defaultValue = !!selectedValue
? selectedValue
: (props.initialValue as string);

return (
<StyledRadioGroup
Expand Down
17 changes: 15 additions & 2 deletions app/client/src/pages/Editor/DataSourceEditor/DatasourceSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { isMultipleEnvEnabled } from "ee/utils/planHelpers";
import { selectFeatureFlags } from "ee/selectors/featureFlagsSelectors";
import { Text } from "@appsmith/ads";
import { Table } from "@appsmith/ads-old";
import type { FeatureFlags } from "ee/entities/FeatureFlag";

const Key = styled.div`
color: var(--ads-v2-color-fg-muted);
Expand Down Expand Up @@ -69,6 +70,7 @@ interface RenderDatasourceSectionProps {
showOnlyCurrentEnv?: boolean;
currentEnv: string;
isEnvEnabled: boolean;
featureFlags?: FeatureFlags;
}
const renderKVArray = (
// TODO: Fix this the next time the file is edited
Expand Down Expand Up @@ -140,6 +142,7 @@ export function renderDatasourceSection(
currentEnvironment: string,
datasource: Datasource,
viewMode: boolean | undefined,
featureFlags?: FeatureFlags,
) {
return (
<React.Fragment key={datasource.id}>
Expand All @@ -148,7 +151,7 @@ export function renderDatasourceSection(
isHidden(
datasource.datasourceStorages[currentEnvironment],
section.hidden,
undefined,
featureFlags,
viewMode,
)
)
Expand All @@ -168,6 +171,7 @@ export function renderDatasourceSection(
currentEnvironment,
datasource,
viewMode,
featureFlags,
);
} else {
try {
Expand Down Expand Up @@ -320,6 +324,7 @@ class RenderDatasourceInformation extends React.Component<RenderDatasourceSectio
config,
currentEnv,
datasource,
featureFlags,
isEnvEnabled,
showOnlyCurrentEnv,
viewMode,
Expand All @@ -333,7 +338,13 @@ class RenderDatasourceInformation extends React.Component<RenderDatasourceSectio
return null;
}

return renderDatasourceSection(config, currentEnv, datasource, viewMode);
return renderDatasourceSection(
config,
currentEnv,
datasource,
viewMode,
featureFlags,
);
}

return (
Expand All @@ -357,10 +368,12 @@ const mapStateToProps = (state: AppState, ownProps: any) => {
? false
: isMultipleEnvEnabled(selectFeatureFlags(state));
const currentEnvironmentId = getCurrentEnvironmentId(state);
const featureFlags = selectFeatureFlags(state);

return {
currentEnv: isEnvEnabled ? currentEnvironmentId : getDefaultEnvId(),
isEnvEnabled,
featureFlags,
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public enum FeatureFlagEnum {
release_embed_hide_share_settings_enabled,
rollout_datasource_test_rate_limit_enabled,
release_google_sheets_shared_drive_support_enabled,
release_gs_all_sheets_options_enabled,

// Deprecated CE flags over here
release_git_autocommit_feature_enabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,48 @@
{
"label": "Read / Write / Delete | Selected google sheets",
"value": "https://www.googleapis.com/auth/drive.file"
},
{
"label": "Read / Write / Delete | All google sheets",
"value": "https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drive"
},
{
"label": "Read / Write | All google sheets",
"value": "https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drive.readonly"
},
{
"label": "Read | All google sheets",
"value": "https://www.googleapis.com/auth/spreadsheets.readonly,https://www.googleapis.com/auth/drive.readonly"
}
],
"initialValue": "https://www.googleapis.com/auth/drive.file",
"customStyles": {
"width": "340px"
},
"hidden": {
"flagValue": "release_gs_all_sheets_options_enabled",
"comparison": "FEATURE_FLAG",
"value": false
}
},
{
"label": "Permissions | Scope",
"configProperty": "datasourceConfiguration.authentication.scopeString",
"controlType": "RADIO_BUTTON",
"options": [
{
"label": "Read / Write / Delete | Selected google sheets",
"value": "https://www.googleapis.com/auth/drive.file"
}
],
"initialValue": "https://www.googleapis.com/auth/drive.file",
"customStyles": {
"width": "340px"
},
"hidden": {
"flagValue": "release_gs_all_sheets_options_enabled",
"comparison": "FEATURE_FLAG",
"value": true
}
}
]
Expand Down