PromucFlow_constructor/app/client/packages
Rahul Barwal 0c96ea330f
fix: Incorrect display of values in table computed value (#40664)
## Description
<ins>Problem</ins>

When editing the Computed Value field of a column in the Table widget, a
closing round bracket `)` is automatically removed from specific
expressions upon losing focus, leading to broken expressions and
incorrect widget behavior.

<ins>Root cause</ins>

Incorrect handling of double curly braces and nested parentheses in the
`computedValue` parsing logic.

<ins>Solution</ins>

This PR handles the correction of expression parsing in
`ComputeTablePropertyControlV2` by updating the extraction logic to
support nested parentheses correctly. It also includes a test to ensure
this functionality works as expected.

Fixes #40265
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Table"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/15061326484>
> Commit: 156df279926fc8e39f194d46e868d46c62a1b2bf
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=15061326484&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table`
> Spec:
> <hr>Fri, 16 May 2025 06:11:17 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved handling of malformed expressions in table computed value
inputs, resulting in more consistent error output.
- Enhanced default computed value behavior to provide a fallback when
table data is empty, preventing errors.
- **Tests**
- Updated and expanded test cases for computed value extraction,
including new input variations and revised expectations for malformed
expressions.
- **Chores**
- Added a migration step to update older computed values for correct
display in widgets.
  - Incremented DSL version to include latest migration updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-02 14:56:28 +05:30
..
ast chore: upgrade version of acorn and acron walk (#37641) 2024-11-22 01:53:58 +05:30
design-system chore: Updating the dropdown width for the run behavior settings of JS object (#40691) 2025-05-19 19:33:27 +05:30
dsl fix: Incorrect display of values in table computed value (#40664) 2025-06-02 14:56:28 +05:30
eslint-plugin chore: add custom consistent-storybook-title rule (#38241) 2024-12-19 10:22:39 +03:00
icons chore: Remove AI avatar from Icons package (#39687) 2025-03-12 12:56:46 +01:00
rts chore: ab test simple git reset in git status api (#39959) 2025-04-01 21:36:08 +05:30
storybook chore: bump vite from 6.2.2 to 6.2.6 in /app/client (#40229) 2025-04-28 11:09:55 +00:00
utils chore: shift the chat button when scrollbar shows (#39559) 2025-03-05 16:34:50 +05:30