Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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,14 +1,13 @@
import { demoTableDataForSelect } from "../../../../../fixtures/Table/DemoTableData";
import { featureFlagIntercept } from "../../../../../support/Objects/FeatureFlags";
import {
agHelper,
assertHelper,
deployMode,
draggableWidgets,
entityExplorer,
locators,
propPane,
deployMode,
table,
assertHelper,
locators,
draggableWidgets,
agHelper,
} from "../../../../../support/Objects/ObjectsCore";
import EditorNavigation, {
EntityType,
Expand Down Expand Up @@ -145,9 +144,6 @@ describe(

it("11. Verify table search includes label and value for table with select column type", () => {
deployMode.NavigateBacktoEditor();
// This flag is turned on to allow the label show in the table select cell content
// when this feature is turned on fully, this flag will be removed
featureFlagIntercept({ release_table_cell_label_value_enabled: true });
EditorNavigation.SelectEntityByName("Table1", EntityType.Widget);
propPane.EnterJSContext("Table data", demoTableDataForSelect);

Expand Down Expand Up @@ -178,7 +174,6 @@ describe(
});

it("12. Verify table filter for select column type", function () {
featureFlagIntercept({ release_table_cell_label_value_enabled: true });
table.OpenNFilterTable("role", "is exactly", "Product Manager");
table.ReadTableRowColumnData(0, 2, "v2").then(($cellData) => {
expect($cellData).to.eq("Product Manager");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { featureFlagIntercept } from "../../../../../support/Objects/FeatureFlags";
import * as _ from "../../../../../support/Objects/ObjectsCore";
import PageList from "../../../../../support/Pages/PageList";
const testdata = require("../../../../../fixtures/testdata.json");
const commonlocators = require("../../../../../locators/commonlocators.json");
import PageList from "../../../../../support/Pages/PageList";

const demoTableData = `
{{
Expand Down Expand Up @@ -117,9 +116,6 @@ describe(
});

it("2. Verifies that default sorting works for a select column using the value property", function () {
// This flag is turned on to allow the label show in the table select cell content
// when this feature is turned on fully, this flag will be removed
featureFlagIntercept({ release_table_cell_label_value_enabled: true });
cy.dragAndDropToCanvas("tablewidgetv2", { x: 350, y: 500 });
_.propPane.EnterJSContext("Table data", demoTableData);

Expand Down Expand Up @@ -169,9 +165,6 @@ describe(
});

it("3. Verifies that sorting works for the select column type when sortBy is set to label", function () {
// This flag is turned on to allow the label show in the table select cell content
// when this feature is turned on fully, this flag will be removed
featureFlagIntercept({ release_table_cell_label_value_enabled: true });
cy.dragAndDropToCanvas("tablewidgetv2", { x: 350, y: 500 });
_.propPane.EnterJSContext("Table data", demoTableData);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import * as _ from "../../../../../../support/Objects/ObjectsCore";
import {
PageLeftPane,
PagePaneSegment,
} from "../../../../../../support/Pages/EditorNavigation";

const commonlocators = require("../../../../../../locators/commonlocators.json");
import * as _ from "../../../../../../support/Objects/ObjectsCore";
import { featureFlagIntercept } from "../../../../../../support/Objects/FeatureFlags";

describe(
"Table widget - Select column type functionality",
Expand Down Expand Up @@ -206,7 +205,6 @@ describe(

it("7. should check that on option select is working", () => {
_.agHelper.CheckForPageSaveError();
featureFlagIntercept({ release_table_cell_label_value_enabled: true });
cy.openPropertyPane("tablewidgetv2");
cy.editColumn("step");
cy.get(".t--property-control-onoptionchange .t--js-toggle").click();
Expand Down
3 changes: 0 additions & 3 deletions app/client/src/ce/entities/FeatureFlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ export const FEATURE_FLAG = {
"rollout_remove_feature_walkthrough_enabled",
release_drag_drop_building_blocks_enabled:
"release_drag_drop_building_blocks_enabled",
release_table_cell_label_value_enabled:
"release_table_cell_label_value_enabled",
rollout_side_by_side_enabled: "rollout_side_by_side_enabled",
release_layout_conversion_enabled: "release_layout_conversion_enabled",
release_anvil_toggle_enabled: "release_anvil_toggle_enabled",
Expand Down Expand Up @@ -63,7 +61,6 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = {
license_gac_enabled: false,
release_anvil_enabled: false,
release_drag_drop_building_blocks_enabled: false,
release_table_cell_label_value_enabled: false,
license_git_branch_protection_enabled: false,
license_git_continuous_delivery_enabled: false,
license_widget_rtl_support_enabled: false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { FEATURE_FLAG } from "ee/entities/FeatureFlag";
import React, { useCallback, useMemo } from "react";
import styled from "styled-components";
import { useFeatureFlag } from "utils/hooks/useFeatureFlag";
import SelectComponent from "widgets/SelectWidget/component";
import type { DropdownOption } from "widgets/SelectWidget/constants";
import type { EditableCellActions } from "widgets/TableWidgetV2/constants";
Expand Down Expand Up @@ -196,25 +194,17 @@ export const SelectCell = (props: SelectProps) => {
.map((d: DropdownOption) => d.value)
.indexOf(value);

const releaseTableSelectCellLabelValue = useFeatureFlag(
FEATURE_FLAG.release_table_cell_label_value_enabled,
);

const cellLabelValue = useMemo(() => {
if (releaseTableSelectCellLabelValue) {
if (!options.length) return value;
if (!options.length) return value;

const selectedOption = options.find(
(option) => option[TableSelectColumnOptionKeys.VALUE] === value,
);
const selectedOption = options.find(
(option) => option[TableSelectColumnOptionKeys.VALUE] === value,
);

return selectedOption
? selectedOption[TableSelectColumnOptionKeys.LABEL]
: "";
} else {
return value;
}
}, [releaseTableSelectCellLabelValue, value, options]);
return selectedOption
? selectedOption[TableSelectColumnOptionKeys.LABEL]
: "";
}, [value, options]);

if (isEditable && isCellEditable && isCellEditMode) {
return (
Expand Down