PromucFlow_constructor/app/client/src/widgets
Rahul Barwal 6c8d4a9a66
fix: Fixes currentRow calculation logic in table(property pane) (#35390)
## Description

<ins>Problem</ins>
`currentRow` variable which is availabe in property pane of col settings
- is not getting correct value during runtime if the table is sorted or
filtered.

<ins>Root cause</ins> 
* We are considering `processedTableData` to get the `currentRow`.
* This property is not updated during filtering and sorting, another
property `filteredTableData` is updated instead.
* We CANNOT use `filteredTableData` as it depends on `primaryColumns`
property which we intend to update as well - this is leading to cyclic
dependency during evaluations.

<ins>Solution</ins>
Since the problem is related to edit cases and given the constraints
around using `filteredTableData` directly, we fixed the problem by
adding a new property to `editableCellValue` object called
`__originalIndex__`.
* This property stores the index of the row being edited in
`processedTableData`
* On top of this change, the PR adds a migration for updating the
current row binding in TableWidgetV2, ensuring accurate current row
calculation and improving the functionality of the widget.
* We also added unit test for migration changes.
* Additionally, This pull request refactors the DSLs for TableWidgetV2
migration test cases to update the DSLs to separate folder, drastically
reducing the file size to its core logic, improving the readability of
the code.
 * We also updated relevant test cases to account for this change.

[Testing
plan](https://www.notion.so/appsmith/Issue-34346-currentRow-doesn-t-work-correctly-when-the-table-is-filtered-449225ae822c485493036599c2b19487)
[Counter part EE
pr](https://github.com/appsmithorg/appsmith-ee/pull/4879)

Fixes #34346
_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.All"

### 🔍 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/10451549845>
> Commit: d1d65c6898c223bf3f6dfbfe93b8e8de214fcc7d
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10451549845&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Mon, 19 Aug 2024 11:15:04 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Updated DSL migration process to support version 90, enhancing
compatibility and robustness.
- Introduced new migration logic for table widget data bindings,
improving inline editing capabilities.
- Enhanced validation logic for editable cells in table widgets,
allowing for more dynamic data handling.
- Added a method to discard edits in specific table cells, improving
user interaction.
- Introduced a new message constant for required fields, enhancing user
feedback.

- **Bug Fixes**
- Improved validation checks for table cells based on updated indices
and values.

- **Tests**
- Added comprehensive tests to validate migration functions related to
Table Widget, ensuring all aspects function correctly post-update.
- Enhanced test specifications for improved validation logic and
coverage in table widget functionalities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: sneha122 <sneha@appsmith.com>
2024-08-20 13:31:45 +05:30
..
anvil chore: add isVisible in default values in wds widgets (#35624) 2024-08-13 14:57:50 +03:00
AudioRecorderWidget chore: rename old ADS package (#35517) 2024-08-08 15:55:00 +03:00
AudioWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
BaseInputWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
BaseWidgetHOC chore: Added profiling for widget components performance (#34912) 2024-07-26 21:12:31 +05:30
ButtonGroupWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
ButtonWidget chore: rename ADS package (#35583) 2024-08-09 17:20:29 +03:00
CameraWidget chore: rename old ADS package (#35517) 2024-08-08 15:55:00 +03:00
CategorySliderWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
ChartWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
CheckboxGroupWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
CheckboxWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
CircularProgressWidget chore: Move widget deprecation messages from propertyPaneView to individual Widget configurations (#33759) 2024-06-04 11:55:55 +05:30
CodeScannerWidget chore: rename old ADS package (#35517) 2024-08-08 15:55:00 +03:00
components chore: rename old ADS package (#35517) 2024-08-08 15:55:00 +03:00
ContainerWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
CurrencyInputWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
CustomWidget chore: rename ADS package (#35583) 2024-08-09 17:20:29 +03:00
DatePickerWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
DatePickerWidget2 fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
DividerWidget feat: update explorer widget icons (#34018) 2024-06-12 10:44:22 +01:00
DocumentViewerWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
DropdownWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
ExternalWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
FilepickerWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
FilePickerWidgetV2 chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
FormButtonWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
FormWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
IconButtonWidget feat: update explorer widget icons (#34018) 2024-06-12 10:44:22 +01:00
IconWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
IframeWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
ImageWidget chore: rename old ADS package (#35517) 2024-08-08 15:55:00 +03:00
InputWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
InputWidgetV2 fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
JSONFormWidget perf: JSONForm widget optimise calling of clear errors (#35717) 2024-08-19 09:50:10 +05:30
ListWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
ListWidgetV2 fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
MapChartWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
MapWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
MenuButtonWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
ModalWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
MultiSelectTreeWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
MultiSelectWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
MultiSelectWidgetV2 fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
NumberSliderWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
PhoneInputWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
ProgressBarWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
ProgressWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
QRGeneratorWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
RadioGroupWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
RangeSliderWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
RateWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
RichTextEditorWidget chore: Upgrade TinyMCE (#35399) 2024-08-08 20:08:09 +05:30
SelectWidget chore: batching updates for a few widgets to reduce rerenders (#35594) 2024-08-12 13:54:44 +05:30
SingleSelectTreeWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
StatboxWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
SwitchGroupWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
SwitchWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
TableWidget chore: rename old ADS package (#35517) 2024-08-08 15:55:00 +03:00
TableWidgetV2 fix: Fixes currentRow calculation logic in table(property pane) (#35390) 2024-08-20 13:31:45 +05:30
TabsMigrator chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
TabsWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
TextWidget chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
VideoWidget fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
wds chore: Fix table columns when hidden are not greyed out in preview mode (#35729) 2024-08-17 10:35:01 +05:30
BaseComponent.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
BaseWidget.tsx fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
CanvasWidget.tsx chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
ConnectDataOverlay.tsx chore: rename ADS package (#35583) 2024-08-09 17:20:29 +03:00
index.ts chore: stat widget polish (#33696) 2024-05-27 16:54:03 +00:00
MetaHOC.tsx fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
MetaWidgetContextProvider.tsx feat: Add widget responsiveness and conversion algorithm (#21386) 2023-04-07 09:51:35 -04:00
Skeleton.tsx perf: Widget re-rendering refactor (#14485) 2022-08-19 15:40:36 +05:30
SkeletonWidget.tsx feat: implement dropping building blocks on canvas (#31857) 2024-04-16 09:41:09 +01:00
useDropdown.tsx chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
utils.test.ts feat: code scanner widget default camera (#26083) 2023-08-10 12:18:51 +05:30
utils.ts feat: code scanner widget default camera (#26083) 2023-08-10 12:18:51 +05:30
WidgetUtils.test.ts chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
WidgetUtils.ts chore: use ads icons (#35633) 2024-08-16 17:23:57 +03:00
withLazyRender.tsx chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
withWidgetProps.tsx fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00