Skip to content

Conversation

@kevinkim-ogp
Copy link
Contributor

Feature(s)

  • Find single row returns variables even when no row found
  • Add tags for variables such as attachments, lists, and Tile Row ID

Fix(es)

  • FormSG connection URL redirects to correct env
  • Updated Postman guide links

pregnantboy and others added 8 commits May 6, 2025 18:09
…columns + row id even if no rows found (#952)

### Problem

"Find Single Row" action does not return columns and row ID when no rows are found, making it difficult for users to set up the "Update Row" step.

### Solution
- Modified the `find-single-row` action to return an empty row ID and an empty row object with all columns set to empty strings when no rows are found
- Added ordering for `rowsFound` and `rowId` to appear before column data
- Added a test case to verify the behaviour when no rows are found

### How to test?

1. Create a "Find Single Row" action with filters that won't match any rows
2. Run the action and verify that:
   - `Row Found` is set to 0
   - `Row ID` is an empty string
   - All column values are empty strings
   - The metadata fields are properly ordered
…ables (#953)

### Problem

Show all variables in Row ID input in Update single row is confusing to users.

### Solution

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/ycT2Xb5nBEjN2kf2gy95/8fd5431e-dc5d-467c-9057-d5a0f93669e7.png)

Filter only Row IDs to show as variables
- Added a new variable type `tile_row_id` to the `TDataOutMetadatumType` enum
- Set the type for `rowId` in the Find Single Row, Update Single Row and Create Row actions
- Added `variableTypes` constraint to the Update Row action to accept `tile_row_id` variables

### How to test?
1. Create a workflow with a "Find Single Row" action
2. Add an "Update Row" action after it
3. Verify that only the Row ID output is shown in the variable list
… attachment (#954)

### Problem
- Certain variable types can be confusing to users, e.g. users may not know what Row ID can be used for
- FormSG attachments not showing in output results, users may think that they're not processed

### Solution

Add a tag to variables with a explanation tooltip. Also, show all variable types (including files) in output.
- Added a new `VariableTag` component that displays tags for specific variable types (array, file, tile_row_id)
- Each tag includes a tooltip explaining the variable's purpose
- Remove filtering by variable type in TestSubstep output.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/ycT2Xb5nBEjN2kf2gy95/93afab7a-a263-4c3c-95c1-0d9ee8136e64.png)

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/ycT2Xb5nBEjN2kf2gy95/6b4950fb-d058-4dd7-a20e-3db11ceb4623.png)

### How to test?

a. Test that FormSG show attachment results in test results
b. Test that variables has the appropriate Variable Tag (e.g. attachment, tile row ID, etc.)
## Problem
Postman guide link changed.

## Before & After Screenshots

**BEFORE**:


https://github.com/user-attachments/assets/f66fae69-03ab-4907-b1c2-83d090f4133d

**AFTER**:


https://github.com/user-attachments/assets/bf15a238-0c5e-4840-8ae5-9a2e8b447a7c


## Tests
- [ ] Verify that Link element for supported file types opens a new tab
to Postman's new guide
## Problem

Right now, users can name their form `[UAT]` or `[STAGING]` and the form
link gets broken

## Solution

Add an env to the auth so that the frontend can process whether it is
prod, staging or UAT.

## Tests

- [ ] Staging form shows correct URL and display
- [ ] Prod form shows correct URL and display
- [ ] Prod form with `[UAT]` or `[STAGING]` still shows prod url
## Problem

Excel `getTopNTableRows` is buggy because `usedRange` includes all
non-empty cells (not limited to a table)
It can accidentally include:
- Stray formatting
- Other tables if you resize too far

There's no way to limit `usedRange` to a table specifically — it works
on worksheet or relative range context

## Solution

Considered using the `rows` API, but it involves pagination so the query
takes around 5s for a table of 50k rows
Also considered using the `columns` API, but it does not return the
`headerSheetRowIndex` address so another API query has to be made to
obtain it

Eventually settled on using `range` which gives both the header row and
data rows as well as the `headerSheetRowIndex`, keeping the API call to
still be 1

## Tests
`getTableRow` action:
- [ ] Works for multiple found rows (the first row found is returned)
- [ ] Values outside the table will not be retrieved

`updateTableRow` action:
- [ ] Works for multiple found rows (the first row found is returned)
- [ ] Values outside the table will not be retrieved
@kevinkim-ogp kevinkim-ogp requested a review from a team as a code owner May 15, 2025 05:51
@datadog-opengovsg
Copy link

Datadog Report

Branch report: develop-v2
Commit report: 2de4d6f
Test service: plumber

✅ 0 Failed, 774 Passed, 0 Skipped, 2m 20.67s Total Time
➡️ Test Sessions change in coverage: 1 no change

Copy link
Contributor

@m0nggh m0nggh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm gogo

@kevinkim-ogp kevinkim-ogp merged commit 9803795 into production May 15, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants