From 64a0a444460accf5b3b87a576d00a64641de9d7e Mon Sep 17 00:00:00 2001 From: vicky-primathon <67091118+vicky-primathon@users.noreply.github.com> Date: Fri, 22 Jan 2021 15:07:43 +0530 Subject: [PATCH 01/47] Remove table row alternating colors (#2552) --- .../designSystems/appsmith/TableStyledWrappers.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/client/src/components/designSystems/appsmith/TableStyledWrappers.tsx b/app/client/src/components/designSystems/appsmith/TableStyledWrappers.tsx index 9f835ef8c7..3287362734 100644 --- a/app/client/src/components/designSystems/appsmith/TableStyledWrappers.tsx +++ b/app/client/src/components/designSystems/appsmith/TableStyledWrappers.tsx @@ -41,12 +41,7 @@ export const TableWrapper = styled.div<{ } .tr { overflow: hidden; - :nth-child(even) { - background: ${Colors.ATHENS_GRAY_DARKER}; - } - :nth-child(odd) { - background: ${Colors.WHITE}; - } + background: ${Colors.WHITE}; &.selected-row { background: ${Colors.POLAR}; &:hover { From 154a4d30c97b4554a01fb73a2e31414f56fe9dfa Mon Sep 17 00:00:00 2001 From: vicky-primathon <67091118+vicky-primathon@users.noreply.github.com> Date: Fri, 22 Jan 2021 15:08:48 +0530 Subject: [PATCH 02/47] Persist column sizes on resize in app viewer for the duration of the session (#2578) --- app/client/src/widgets/TableWidget.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/client/src/widgets/TableWidget.tsx b/app/client/src/widgets/TableWidget.tsx index dd86f8f347..7cf4345974 100644 --- a/app/client/src/widgets/TableWidget.tsx +++ b/app/client/src/widgets/TableWidget.tsx @@ -590,7 +590,14 @@ class TableWidget extends BaseWidget { super.updateWidgetProperty("columnNameMap", columnNameMap); }} handleResizeColumn={(columnSizeMap: { [key: string]: number }) => { - super.updateWidgetProperty("columnSizeMap", columnSizeMap); + if (this.props.renderMode === RenderModes.CANVAS) { + super.updateWidgetProperty("columnSizeMap", columnSizeMap); + } else { + this.props.updateWidgetMetaProperty( + "columnSizeMap", + columnSizeMap, + ); + } }} handleReorderColumn={(columnOrder: string[]) => { super.updateWidgetProperty("columnOrder", columnOrder); @@ -607,11 +614,7 @@ class TableWidget extends BaseWidget { }} compactMode={this.props.compactMode || CompactModeTypes.DEFAULT} updateCompactMode={(compactMode: CompactMode) => { - if (this.props.renderMode === RenderModes.CANVAS) { - this.props.updateWidgetMetaProperty("compactMode", compactMode); - } else { - this.props.updateWidgetMetaProperty("compactMode", compactMode); - } + this.props.updateWidgetMetaProperty("compactMode", compactMode); }} sortTableColumn={this.handleColumnSorting} /> From b1564c94522da1ec1b27a01ecf5c143af6663186 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Fri, 22 Jan 2021 15:10:42 +0530 Subject: [PATCH 03/47] Add Sentry token to enable Sentry integration (#2674) --- .github/workflows/client.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index f216705ee0..fb3e6c82a2 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -100,6 +100,7 @@ jobs: REACT_APP_ENVIRONMENT=${{steps.vars.outputs.REACT_APP_ENVIRONMENT}} \ REACT_APP_FUSIONCHARTS_LICENSE_KEY=${{ secrets.APPSMITH_FUSIONCHARTS_LICENSE_KEY }} \ REACT_APP_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} \ + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} \ REACT_APP_VERSION_ID=${{ steps.vars.outputs.version }} \ REACT_APP_VERSION_RELEASE_DATE=$(date +%Y-%m-%d) \ yarn build From ae276a93f84e5e6f6d50e699ac9783b17e5d287b Mon Sep 17 00:00:00 2001 From: vicky-primathon <67091118+vicky-primathon@users.noreply.github.com> Date: Fri, 22 Jan 2021 15:14:03 +0530 Subject: [PATCH 04/47] Fix - Boolean values comparison in Table widget filters(#2586) - Display filter label instead of value --- .../src/components/designSystems/appsmith/CascadeFields.tsx | 2 +- .../src/components/designSystems/appsmith/TableUtilities.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/client/src/components/designSystems/appsmith/CascadeFields.tsx b/app/client/src/components/designSystems/appsmith/CascadeFields.tsx index 3151475c9f..17ad47fe3a 100644 --- a/app/client/src/components/designSystems/appsmith/CascadeFields.tsx +++ b/app/client/src/components/designSystems/appsmith/CascadeFields.tsx @@ -246,7 +246,7 @@ const RenderOptions = (props: { (i) => i.value === props.value, ); if (selectedOptions && selectedOptions.length) { - selectValue(selectedOptions[0].value); + selectValue(selectedOptions[0].label); } else { selectValue(props.placeholder); } diff --git a/app/client/src/components/designSystems/appsmith/TableUtilities.tsx b/app/client/src/components/designSystems/appsmith/TableUtilities.tsx index 9676f1a010..b51f2f9d30 100644 --- a/app/client/src/components/designSystems/appsmith/TableUtilities.tsx +++ b/app/client/src/components/designSystems/appsmith/TableUtilities.tsx @@ -883,7 +883,7 @@ export const ConditionFunctions: { [key: string]: (a: any, b: any) => boolean; } = { isExactly: (a: any, b: any) => { - return a === b; + return a.toString() === b.toString(); }, empty: (a: any) => { return a === "" || a === undefined || a === null; From a9e0b5b67897e26546a50c710d0699bca64d5a60 Mon Sep 17 00:00:00 2001 From: vicky-primathon <67091118+vicky-primathon@users.noreply.github.com> Date: Fri, 22 Jan 2021 15:15:14 +0530 Subject: [PATCH 05/47] Fix - `selectedRow` autocomplete suggestions when no row is selected (#2603) --- app/client/src/widgets/TableWidget.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/src/widgets/TableWidget.tsx b/app/client/src/widgets/TableWidget.tsx index 7cf4345974..c7369b76d3 100644 --- a/app/client/src/widgets/TableWidget.tsx +++ b/app/client/src/widgets/TableWidget.tsx @@ -361,7 +361,7 @@ class TableWidget extends BaseWidget { const columnKeys: string[] = getAllTableColumnKeys(this.props.tableData); const selectedRow: { [key: string]: any } = {}; for (let i = 0; i < columnKeys.length; i++) { - selectedRow[columnKeys[i]] = undefined; + selectedRow[columnKeys[i]] = ""; } return selectedRow; } From a3091076238e39e2cae7a3ef8d5c3f231ad4b969 Mon Sep 17 00:00:00 2001 From: vicky-primathon <67091118+vicky-primathon@users.noreply.github.com> Date: Fri, 22 Jan 2021 15:17:14 +0530 Subject: [PATCH 06/47] Fix - Remove delete icon when there are no filters in table widget (#2605) --- .../designSystems/appsmith/CascadeFields.tsx | 10 ++++++++-- .../designSystems/appsmith/TableFilters.tsx | 12 ++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/app/client/src/components/designSystems/appsmith/CascadeFields.tsx b/app/client/src/components/designSystems/appsmith/CascadeFields.tsx index 17ad47fe3a..256499c486 100644 --- a/app/client/src/components/designSystems/appsmith/CascadeFields.tsx +++ b/app/client/src/components/designSystems/appsmith/CascadeFields.tsx @@ -28,6 +28,9 @@ const StyledRemoveIcon = styled( padding: 0; position: relative; cursor: pointer; + &.hide-icon { + display: none; + } `; const LabelWrapper = styled.div` @@ -290,6 +293,7 @@ type CascadeFieldProps = { value: any; operator: Operator; index: number; + hasAnyFilters: boolean; applyFilter: (filter: ReactTableFilter, index: number) => void; removeFilter: (index: number) => void; }; @@ -447,7 +451,7 @@ const CascadeField = (props: CascadeFieldProps) => { }; const Fields = (props: CascadeFieldProps & { state: CascadeFieldState }) => { - const { index, removeFilter, applyFilter } = props; + const { index, removeFilter, applyFilter, hasAnyFilters } = props; const [state, dispatch] = React.useReducer(CaseCaseFieldReducer, props.state); const handleRemoveFilter = () => { dispatch({ type: CascadeFieldActionTypes.DELETE_FILTER }); @@ -515,7 +519,9 @@ const Fields = (props: CascadeFieldProps & { state: CascadeFieldState }) => { height={16} width={16} color={Colors.RIVER_BED} - className="t--table-filter-remove-btn" + className={`t--table-filter-remove-btn ${ + hasAnyFilters ? "" : "hide-icon" + }`} /> {index === 1 ? ( diff --git a/app/client/src/components/designSystems/appsmith/TableFilters.tsx b/app/client/src/components/designSystems/appsmith/TableFilters.tsx index 6b72968a42..c0fea4d46f 100644 --- a/app/client/src/components/designSystems/appsmith/TableFilters.tsx +++ b/app/client/src/components/designSystems/appsmith/TableFilters.tsx @@ -151,8 +151,11 @@ const TableFilters = (props: TableFilterProps) => { }; }, ); - const showAddFilter = - filters.length >= 1 && filters[0].column && filters[0].condition; + const hasAnyFilters = !!( + filters.length >= 1 && + filters[0].column && + filters[0].condition + ); return ( { className="t--table-filter-toggle-btn" selected={selected} icon={ - showAddFilter ? ( + hasAnyFilters ? ( {filters.length} ) : null } @@ -194,6 +197,7 @@ const TableFilters = (props: TableFilterProps) => { condition={filter.condition} value={filter.value} columns={columns} + hasAnyFilters={hasAnyFilters} applyFilter={(filter: ReactTableFilter, index: number) => { const updatedFilters = props.filters ? [...props.filters] @@ -215,7 +219,7 @@ const TableFilters = (props: TableFilterProps) => { /> ); })} - {showAddFilter ? ( + {hasAnyFilters ? (