Skip to content

Commit 8f5c34e

Browse files
Release v1.54.2 (#1250)
## Changes - Hotfix for tiles v1 isEmpty filter - Fix divider misalignment in nested steps --------- Co-authored-by: kevin <[email protected]>
2 parents ab5d01e + e2772ae commit 8f5c34e

File tree

7 files changed

+44
-9
lines changed

7 files changed

+44
-9
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,5 @@
111111
"tsconfig-paths": "^4.2.0",
112112
"type-fest": "4.10.3"
113113
},
114-
"version": "1.54.1"
114+
"version": "1.54.2"
115115
}

packages/backend/src/models/tiles/dynamodb/__tests__/table-row/functions.itest.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,34 @@ describe('dynamodb table row functions', () => {
258258
expect(rows8.length).toEqual(1000)
259259
})
260260

261+
it('empty filter should work with empty string, null and undefined', async () => {
262+
const dataArray: any[] = []
263+
;['', null, 123, 'abc'].forEach((value, index) => {
264+
dataArray.push({
265+
a: `${index}`,
266+
b: value,
267+
})
268+
})
269+
dataArray.push({
270+
a: `undefined value`,
271+
})
272+
await createTableRows({ tableId: dummyTable.id, dataArray })
273+
274+
// Empty
275+
const { rows } = await getTableRows({
276+
tableId: dummyTable.id,
277+
columnIds: ['a', 'b'],
278+
filters: [
279+
{
280+
columnId: 'b',
281+
operator: TableRowFilterOperator.IsEmpty,
282+
value: '',
283+
},
284+
],
285+
})
286+
expect(rows.length).toEqual(3)
287+
})
288+
261289
it('should get relevant rows based on composite filters', async () => {
262290
const dataArray = []
263291
for (let i = 0; i < 1000; i++) {

packages/backend/src/models/tiles/dynamodb/table-row/functions.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ const addFiltersToQuery = (
121121
): void => {
122122
if (filters?.length) {
123123
query.where(
124-
({ data }, { eq, begins, contains, gt, gte, lt, lte, notExists }) => {
124+
(
125+
{ data },
126+
{ eq, begins, contains, gt, gte, lt, lte, notExists, type },
127+
) => {
125128
const whereExpressions: string[] = []
126129
for (const filter of filters) {
127130
const { columnId, operator, value } = filter
@@ -150,7 +153,9 @@ const addFiltersToQuery = (
150153
break
151154
case TableRowFilterOperator.IsEmpty:
152155
whereExpressions.push(
153-
`(${eq(data[columnId], '')} OR ${notExists(data[columnId])})`,
156+
`(${eq(data[columnId], '')} OR ${notExists(
157+
data[columnId],
158+
)} OR ${type(data[columnId], 'NULL')})`,
154159
)
155160
break
156161
}

packages/frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "frontend",
3-
"version": "1.54.1",
3+
"version": "1.54.2",
44
"type": "module",
55
"scripts": {
66
"dev": "wait-on tcp:3000 && vite --host --force",

packages/frontend/src/components/FlowStepGroup/Content/IfThen/HoverAddStepButton.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ export function HoverAddStepButton(
8383
onMouseEnter={() => setIsHovered(true)}
8484
onMouseLeave={() => setIsHovered(false)}
8585
w={
86-
(shouldShowDragHandle || canChildStepsReorder) && !isDrawerOpen
86+
(shouldShowDragHandle || canChildStepsReorder) &&
87+
!isDrawerOpen &&
88+
!readOnly
8789
? `calc(100% - ${NESTED_DRAG_HANDLE_WIDTH}px)`
8890
: 'full'
8991
}

packages/types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"name": "@plumber/types",
33
"description": "Shared types for plumber",
44
"types": "./index.d.ts",
5-
"version": "1.54.1"
5+
"version": "1.54.2"
66
}

0 commit comments

Comments
 (0)