Commit Graph

207 Commits

Author SHA1 Message Date
Jacques Ikot
c162311f43
feat: implement table widget infinite scroll with dynamic height (#39646)
## Description
This PR adds support for variable height rows in the Table Widget when
using infinite scroll. The implementation dynamically adjusts row
heights based on content, particularly for wrapped text and HTML
content.

## Key Features
1. **Dynamic Row Height Calculation**: Rows automatically resize based
on content length when cell wrapping is enabled or HTML content is
present
2. **Smooth Infinite Scrolling**: Maintains smooth scrolling performance
while supporting variable height rows
3. **Responsive Layout**: Rows adjust in real-time when table data
changes or when cell wrapping is toggled

## Implementation Details
The implementation replaces the fixed-size virtual list with a
variable-size virtual list that can handle rows of different heights:
1. Created a new `BaseVirtualList` component that uses
`VariableSizeList` from react-window
2. Added row height measurement logic in the `Row` component to
calculate optimal heights
3. Implemented a context-based system to store and update row heights
4. Created a utility hook `useColumnVariableHeight` to track columns
that need variable height handling

## Testing
Added comprehensive Cypress tests that verify:
1. Fixed height behavior when cell wrapping is disabled
2. Increased row heights when cell wrapping is enabled
3. Dynamic height updates when content changes
4. Proper handling of HTML content that have extended heights
5. Reverting to fixed height when wrapping is disabled


Fixes #39089  

## Automation

/ok-to-test tags="@tag.Widget, @tag.Sanity, @tag.Binding"

### 🔍 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/13946877628>
> Commit: 9f50f22adcb8a8ab9c2aa566c7a0f21e49d1beee
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13946877628&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Widget, @tag.Sanity, @tag.Binding`
> Spec:
> <hr>Wed, 19 Mar 2025 14:39: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

- **New Features**
- Enhanced the table widget to automatically adjust row heights based on
varying content lengths, wrapping settings, and HTML content for a
smoother user experience.
- Improved performance with optimized virtualization of table rows,
ensuring efficient rendering and smooth infinite scrolling.

- **Tests**
- Added a comprehensive test suite validating the table’s behavior under
fixed, dynamic, and updated content conditions, ensuring consistent row
height adjustments during user interactions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Rahul Barwal <rahul.barwal@appsmith.com>
2025-03-20 10:23:37 +01:00
Rahul Barwal
82294f9f85
chore: refactor table widget UI code to use central context to reduce props drilling (#39367)
## Description
Refactor TableWidget for Improved Organization, Context Management &
Rendering Efficiency

### Overview

This PR restructures the TableWidget to enhance code organization,
improve context management, and optimize rendering performance. Key
improvements include extracting reusable components, introducing a
shared TableContext, and simplifying table rendering logic.

### Key Changes
 Improved Table Header Organization & Context Management
 Refactored Table & Virtualization Logic
 Simplified Header Components
 Enhanced Empty Row Handling
 Reorganized Core Components(Static table, virtual table)

### Why These Changes?
• Improves maintainability and readability by reducing prop drilling and
redundant code.
• Enhances performance through better state management and rendering
optimizations.
• Provides a scalable structure for future improvements in the
TableWidget.


Fixes #39308
_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, @tag.Sanity, @tag.Datasource"

### 🔍 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/13761069297>
> Commit: 524a8464a65576c9da485f686e6598eba38358a5
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13761069297&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table, @tag.Sanity, @tag.Datasource`
> Spec:
> <hr>Mon, 10 Mar 2025 12:31:27 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

## Summary by CodeRabbit

- **New Features**
- Introduced new virtualized table components that enhance dynamic
scrolling and table interactions.
  - Added a new table constant to ensure smoother scrolling behavior.
- Implemented a centralized table state provider to consolidate table
functionality.
- Added a new `BannerNActions` component for improved header action
management.
- Added a new `StaticTableBodyComponent` for rendering static table
bodies.

- **Refactor**
- Streamlined static table rendering along with header and cell
interactions.
- Simplified component interfaces by shifting from prop-based to
context-driven state management.
- Enhanced the `Actions` component to utilize context for state
management.
  - Refactored the `Table` component to improve clarity and efficiency.

- **Tests**
- Expanded and improved test coverage to ensure robust rendering, error
handling, and performance.
- Introduced tests for new components such as `StaticTableBodyComponent`
and `BannerNActions`.
- Updated tests to reflect changes in context management and component
structure.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-03-13 11:23:05 +05:30
Rahul Barwal
a20693362b
fix: ensure table rows render with minimum page size (#39626)
## Description
Empty rows were not getting rendered for the server side pagination
enabled due to incorrect calculation of itemCount(introduced here:
https://github.com/appsmithorg/appsmith/pull/39441).

| Previously | Now |
|----------|----------|
|
https://github.com/user-attachments/assets/5f0db0e9-294f-461a-bac6-d3b2fe573817
|
https://github.com/user-attachments/assets/e8678e15-68e5-4f9e-8b2e-b74cf9838a9f
|

Fixes #`Issue Number`  
_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/13722106486>
> Commit: ebbe90bd73a8a573a8ed53f16946a41503b1c84e
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13722106486&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table`
> Spec:
> <hr>Fri, 07 Mar 2025 14:27:47 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**
- Revised the table widget’s row rendering so that it now displays the
full expected number of rows based on the selected page size, ensuring
consistent and reliable pagination behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-03-10 11:34:59 +05:30
Jacques Ikot
44c2a0754b
feat: add basic table infinite scroll function (#39441)
## Infinite Scroll Improvements for TableWidgetV2

This PR enhances the infinite scroll functionality in `TableWidgetV2`
with several key improvements:

---

### 🚀 Major Changes

#### 1️⃣ Improved Loading State Management
- Added a `shouldShowSkeleton()` function to determine when to display
loading skeletons.
- Loading skeletons now only show when:
  - Loading without infinite scroll enabled.
  - Loading with infinite scroll but no data loaded yet.
- Added a dedicated loading indicator for infinite scroll that appears
at the bottom while fetching more data.

#### 2️⃣ Enhanced Infinite Scroll Implementation
- Completely refactored `useInfiniteVirtualization` hook to properly
cache and manage loaded rows.
- Added row caching to maintain previously loaded pages when new data
arrives.
- Improved detection of end-of-data conditions to prevent unnecessary
load attempts.
- Fixed issues with item count calculations and loading state
management.

#### 3️⃣ Better Virtualization Support
- Fixed issues with virtual list rendering by properly passing
`itemCount`.
- Added support for `totalRecordsCount` to optimize infinite scroll
behavior.
- Improved table wrapper class name management with a dedicated
function.

---

### 🧪 Testing
This PR includes **comprehensive test coverage** for the infinite scroll
functionality, with **12 detailed test cases** covering:
-  Page loading and caching behavior.
-  End-of-data detection.
-  Partial page handling.
-  Loading state management.



Fixes #39083

## Automation

/ok-to-test tags="@tag.Binding, @tag.Sanity, @tag.Table, @tag.Widget"

### 🔍 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/13651510022>
> Commit: 3bbfda7143ee29eff70e59d234d6e89c74d8bb88
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13651510022&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Binding, @tag.Sanity, @tag.Table, @tag.Widget`
> Spec:
> <hr>Tue, 04 Mar 2025 11:47:11 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

## Summary by CodeRabbit

- **New Features**
- Introduced support for displaying the total number of records,
improving context for pagination and data navigation.
- Added a loading indicator that displays conditionally based on the
loading state.

- **Refactor**
- Refined loading state visuals so that the skeleton indicator appears
only when appropriate.
- Enhanced infinite scrolling and virtualization behavior for smoother
and more reliable data rendering.
  - Strengthened row indexing to improve overall robustness.
- Improved the structure and readability of the `Table` component's
rendering logic.
- Updated test suite for dynamic row generation and various loading
scenarios, enhancing flexibility and comprehensiveness.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-03-05 09:21:35 +01:00
Rahul Barwal
7f300d6428
feat: Enable download as excel feature on table widget. (#39427) 2025-02-25 17:10:24 +05:30
Hetu Nandu
0401607f50
chore: Set max height for Table Data property control (#39409) 2025-02-24 14:34:10 +05:30
Aman Agarwal
2fce726f80
chore: hide the pagination elements when infinite scroll is enabled for table widget (#39363) 2025-02-21 15:28:50 +05:30
Rahul Barwal
5b9153cb19
feat: Implement infra code for infinite scroll implementation. (#39225)
## Description
Implements infinite scroll functionality for table widget using
react-window-infinite-loader. Introduces new components and hooks to
manage virtualized table rendering with dynamic loading of rows.


Fixes #39082  
_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, @tag.Sanity"

### 🔍 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/13329193341>
> Commit: 0c58fcf83dbfd520958c9989ffb607cf57d1fdb1
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13329193341&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table, @tag.Sanity`
> Spec:
> <hr>Fri, 14 Feb 2025 13:18:37 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

- **New Features**
- Added infinite scrolling support to table views, enabling seamless
data loading as you scroll.
- Enhanced table interfaces with improved loading indicators and
smoother virtualized rendering for large datasets.

- **Chores**
- Updated supporting libraries to underpin the improved scrolling and
data handling capabilities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------
2025-02-17 14:29:40 +05:30
Hetu Nandu
1a60eaaf89
fix: Reduce cycle deps by removing wrong exports (#39268)
## Description

Remove specific cycle dependencies created because a file was both
importing and exporting items it does not modify.

By reducing cycle dependencies here, I am buying credits that allow
adding cycle dependencies in another PR but very hard to avoid

This PR reduces the deps by 4

EE PR: https://github.com/appsmithorg/appsmith-ee/pull/6214

PR which adds the cycle deps:
https://github.com/appsmithorg/appsmith/pull/39100


## Automation

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

### 🔍 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/13324385763>
> Commit: 34a0f459b27963531adf851f198903cf0831b719
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13324385763&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Fri, 14 Feb 2025 07:54:00 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

- **New Features**
- Introduced a “Show More” option in the code editor’s command palette
for additional suggestions.
- Enabled default expansion for table widget panels to improve content
visibility.

- **Refactor**
- Consolidated entity and type management for a more consistent and
maintainable platform.

- **Improvements**
- Enhanced widget behavior with dynamic updates in dropdowns, file
pickers, and map styling for a smoother user experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-14 18:26:31 +05:30
Rahul Barwal
260765520e
feat: Introduce infinite scroll feature behind feature flag. (#39207)
## Description

- Adding `infiniteScrollEnabled` prop to TableWidgetProps
- Added feature flag: `release_tablev2_infinitescroll_enabled` to
control this.

Fixes #39079 
_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, @tag.Sanity"

### 🔍 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/13305863325>
> Commit: 182c03d37644cc0b7f5563ed5c9e59c4c06667b6
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13305863325&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table, @tag.Sanity`
> Spec:
> <hr>Thu, 13 Feb 2025 11:35:05 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

- **New Features**
- Introduced an option to enable infinite scrolling in table views. When
activated, tables automatically adjust scrolling behavior and pagination
controls, enhancing data browsing.
- **Tests**
- Updated test cases to verify the new infinite scrolling functionality,
ensuring it is disabled by default.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-14 15:09:24 +05:30
Aman Agarwal
261cf8bfe6
fix: loading indicator ui for infinite loading table (#39208) 2025-02-13 15:28:25 +05:30
Rahul Barwal
02b89b2db1
chore: Remove HTML column type feature flag and related code (#39108)
## Description
It has been a month since we have turned on the flag for table HTML
column type and we have not seen any issues.

This PR removes all the feature flags related code from the codebase.

Fixes #`Issue Number`  
_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/13195811365>
> Commit: 7a0f810c1f6a271adad082fc5c8b630b427aea34
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13195811365&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table`
> Spec:
> <hr>Fri, 07 Feb 2025 09:20:10 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

- **New Features**
- The HTML column type now appears as a consistently available option
when configuring table widgets.

- **Refactor**
- The table widget’s architecture has been streamlined for improved
modularity and state management, enhancing overall cell rendering.

- **Chore**
- Legacy conditional toggling for the HTML column type has been removed
to simplify configuration and standardize behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-10 14:50:25 +05:30
Vemparala Surya Vamsi
2b9299e2d3
chore: bypass immer for first evaluation, fixed cloneDeep issue and using mutative instead of immer (#38993)
## Description
- Using mutative instead of immer, this has reduced the main thread
scripting by about 1 second.
- Removed a cloneDeep during table onMount which saves about 70ms in
main thread scripting.
- Bypassed mutative when applying the first tree to reduce the overhead
associated to mutative.

Fixes #`Issue Number`  
_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/13164792224>
> Commit: 4cb821723d10198c9db70312a9604df5aa5f80c1
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13164792224&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Thu, 06 Feb 2025 04:21:41 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

- **New Dependency**
  - Integrated a new library to enhance overall state management.

- **Refactor**
- Updated state update mechanisms across interactive components and data
flows.
  - Improved table widget processing for more consistent behavior.

- **Chore**
  - Removed legacy development-only configuration settings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-06 11:20:08 +05:30
Rahul Barwal
1de24080a5
fix: Remove Excel download option from Table widget (#38996) 2025-02-04 16:13:57 +05:30
Rahul Barwal
0d63d7afae
fix: Revert "fix: Enhance error handling in ComputeTablePropertyControlV2 binding methods (#38205)" (#38852) 2025-01-27 18:16:38 +05:30
Rahul Barwal
08cd433794
fix: Enhance error handling in ComputeTablePropertyControlV2 binding methods (#38205) 2025-01-27 10:41:51 +05:30
Rahul Barwal
be2133eda8
chore: remove deprecated feature flag for custom loading state in TableWidget (#38826) 2025-01-24 15:25:09 +05:30
Jacques Ikot
13d316db55
fix: select column to display cell value when options are mismatched (#38387)
## Description
**Problem**
When a table cell is configured with the Select column type, the cell
value is not displayed if it does not match any of the label-value pairs
in the select options. This results in a broken user experience where it
appears as if the cell has no value.

**Expected Behaviour**
The table cell should always display its value if it exists, regardless
of whether it matches the provided select options.

**Solution**
To address this issue, the default behaviour for the select options has
been updated to prioritise the cell's value instead of falling back to
an empty string. This ensures that cell values are always visible to the
user, even if they are not part of the predefined select options.


Fixes #35807

## Automation

/ok-to-test tags="@tag.Widget, @tag.Select, @tag.Binding, @tag.Table,
@tag.Sanity"

### 🔍 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/12544985047>
> Commit: d39d7f30bb9ae713a4d7c2038fbef89b6e8acadf
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12544985047&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Widget, @tag.Select, @tag.Binding, @tag.Table,
@tag.Sanity`
> Spec:
> <hr>Mon, 30 Dec 2024 11:52:44 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 display logic in the SelectCell component to show the value
when no matching option is found.
- Updated test cases for the Select column type functionality to ensure
accurate verification of select options and display behavior when
options are not provided.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-13 07:40:33 +01:00
Jacques Ikot
cda656bab3
feat: add alignment property in style pane for table button cell (#38223)
## Description
**Problem**
When a user uses the button column type in a table widget, the button is
automatically aligned to the left, and the style tab of the button
property pane does not allow the user change the vertical or horizontal
alignment of the button column.

**Solution**
We have added the Alignment property to the button column type for the
table widget, and added tests.


Fixes #38032 

## Automation

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

### 🔍 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/12417408061>
> Commit: 07f2eb0795e04e37ed077a850bc9b87166ea549d
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12417408061&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table, @tag.Widget, @tag.Binding`
> Spec:
> <hr>Thu, 19 Dec 2024 18:44:06 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

- **New Features**
- Added a test suite for validating button cell functionality in the
Table Widget V2.
- Introduced a method to generate CSS selectors for specific table
cells.
  
- **Bug Fixes**
- Enhanced visibility controls for alignment properties based on column
types, particularly for button cells.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-24 07:18:56 +01:00
Rahul Barwal
dcb27d2c87
feat: optimize HTML text extraction in TableWidgetV2 (#38153) 2024-12-23 15:49:46 +05:30
Rahul Barwal
5d213dddc6
chore: Split derived.test.js to separate files. (#38162)
## Description
This PR started with this goal:
- Deleted the unreadable `derived.test.js` (4668 lines) file and split
each suite to its file.
- Moved all `derived.js` related specs in widget folder to __tests__
folder

Later we found that `testRegex` in `jest.config` will treat anything
inside `__tests__` as runnable, so we modify this rule and are moving to
a consistent naming for our unit tests(any file ending with `.test.` or
`.spec.`

This refactor aims to improve maintainability and ensure that the table
widget's derived properties are thoroughly tested.


Fixes #`Issue Number`  
_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=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!WARNING]
> Tests have not run on the HEAD
b3168bb1a6d3070a910972d1d9a78d61a3aaee91 yet
> <hr>Tue, 17 Dec 2024 10:20:54 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
	- Expanded properties for table widget configuration.
- Introduced sample data constants for column schemas and processed
table data.

- **Bug Fixes**
- Improved validation tests for editable cells and row selection
functions.

- **Tests**
- Added comprehensive test suites for various table widget
functionalities, including filtering, sorting, and row selection.
	- Introduced tests for handling HTML content within table columns.
	- Added tests for new functions related to row updates and indices.
- Enhanced test coverage for existing utility functions and table
properties.

- **Chores**
- Updated import paths to reflect a new directory structure across
various test files.
- Modified Jest configuration for improved readability and regex
adjustments.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-17 18:16:27 +05:30
Rahul Barwal
3610bae834
feat: Implements HTML as a column type in table widget. (#37997) 2024-12-11 13:07:30 +05:30
Ankita Kinger
91cf54ba47
chore: Updating the settings icon throughout the product (#37330)
## Description

Updating the settings icon throughout the product to use the below icon:

https://www.figma.com/design/8L9BXMzNTKboGWlHpdXyYP/Appsmith-IDE?node-id=33-3546&t=qpptzxhkWatrFIn1-4


Fixes [#37248](https://github.com/appsmithorg/appsmith/issues/37248)

## Automation

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

### 🔍 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/11796204902>
> Commit: 0e57343a6c2b7543f37e37940f8447be10ccd9e9
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11796204902&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Tue, 12 Nov 2024 12:12:33 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

- **New Features**
- Updated icons for various settings-related components from
"settings-2-line" to "settings-v3" to enhance visual representation.

- **Bug Fixes**
- Improved handling of frame ancestor settings in the AdminSettings
configuration, ensuring better management of stored values.

- **Documentation**
	- No changes to the documentation were made in this release. 

- **Chores**
- Updated multiple components to reflect the new icon, maintaining
overall functionality without introducing new logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-12 18:17:58 +05:30
Rahul Barwal
0288f5b9ef
fix: Enhance URL handling in table by rendering URL column types with <a> tag. (#37179)
## Description
<ins>Problem</ins>

URLs in table were not being rendered as links, resulting in
inconsistent user experience(missing context menus.

<ins>Root cause</ins>

URLs were rendered in `<div>` instead of `<a>`, making the component
lack links related features..

<ins>Solution</ins>

This PR handles... 

- Rendering URLs as links in BasicCell for a better user experience.
- Adding specific types for column properties for more robust data
validation and type checking.
- Adding unit tests for BasicCell functionality to ensure accurate
rendering and behavior.

- Simplifies the AutoToolTipComponent by removing unncessary
`LinkWrapper` component


Fixes #24769
_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/11681339029>
> Commit: b7c5d176b35407923a120bb19e40252e3a61b628
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11681339029&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table`
> Spec:
> <hr>Tue, 05 Nov 2024 10:23:38 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Release Notes

- **New Features**
- Enhanced type safety for `compactMode` and `columnType` properties
across various components.
- Improved rendering logic in the `AutoToolTipComponent` for better
control based on `columnType`.
	- Optimized rendering in the `BasicCell` component using `useMemo`.

- **Bug Fixes**
- Resolved inconsistencies in type definitions for `BasicCell`,
`PlainTextCell`, and `SelectCell` components.
- Updated tooltip behavior in the `AutoToolTipComponent` to ensure
accurate rendering.

- **Tests**
- Introduced a new test suite for the `BasicCell` component, ensuring
proper rendering and interaction behaviors.
- Refined test cases for the `AutoToolTipComponent` to verify accurate
rendering under various conditions.
- Updated test case for URL column verification to check attributes
directly instead of navigation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-06 10:27:57 +05:30
Anas Khafaga
2cfe0b0fac
fix(#16584): filterTableData source of truth (#36849)
## Description
> **TL;DR**: This PR addresses is related to #16584 where editing a
table row with applied filters becomes impossible without clearing the
filters

When a filter is applied to the table data, the current behavior results
in filter updates without validating or saving the updated value of the
row being edited. This leads to a situation where users are unable to
save or discard changes until the filters are cleared. The proposed fix
ensures that the original row is retrieved from the table data and used
in filtering, allowing editing and filtering to work as expected.

Here's a [screen
record](https://drive.google.com/file/d/1JuP_UN_B1vzz_oMeR1ojjPscF_mB3A4x/view?usp=sharing)
for the solution

### Motivation:
The problem arises in scenarios where table rows are editable and
filters are applied. This change ensures that users can continue editing
table rows without being forced to clear filters first.

### Context:
This change is required to improve user experience and fix the broken
editing functionality when filters are active. The change ensures that
editable values in filtered rows are correctly handled and saved.

Fixes https://www.loom.com/share/335d0c61817646a0903d581adf73064e

## Automation

/ok-to-test tags="table-widget,filter,edit"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- 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

- **New Features**
- Improved filtering accuracy in the TableWidgetV2 by using original row
data for evaluations.

- **Bug Fixes**
- Enhanced functionality to ensure that filtering conditions are
evaluated correctly with original data.

- **Tests**
- Added new test cases to validate filtering functionality after edits
in the TableWidgetV2.
- Expanded test coverage for checkbox and switch interactions to ensure
accurate filtering behavior, including new interactions with a discard
button.

- **Style**
	- Minor adjustments to comments and formatting for better readability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-30 17:33:01 +05:30
skjameela
c6cf919beb
fix:- added elipsis and tooltip to the button content in table widget component (#36865)
**Description**

[ Bug issue  ](https://github.com/appsmithorg/appsmith/issues/10278)

I have raised the pr inorder to adding a elipsis and tooltip for the
button content in the table widget component to prevent the data hiding
in overflow

**Screenshot** 

**Before issue resolved**

![Screenshot from 2024-09-26
16-09-21](https://github.com/user-attachments/assets/a5fff31e-27ca-4ee7-b5b8-9d5a02178adc)

**After issue resolved** 

![Screenshot from 2024-10-07
11-46-04](https://github.com/user-attachments/assets/effc40ee-df92-4cef-bdc4-8b9a316daffa)




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

- **New Features**
- Enhanced table widget styling for improved responsiveness and
interactivity.
- Introduced tooltip functionality for buttons, displaying tooltips when
text is truncated.
	- Added new styled components for better structure and visual appeal.

- **Bug Fixes**
	- Improved hover effects and conditional styling for table cells.

- **Tests**
- Added unit tests for the `AutoToolTipComponent`, covering various
tooltip scenarios and behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-30 17:29:59 +05:30
Jacques Ikot
64f1342a40
feat: remove release_table_cell_label_value_enabled feature flag (#37110)
## Description
Removes the `release_table_cell_label_value_enabled` feature flag from
the codebase.

This feature flag helped us launch the tables ability to show labels
instead of values for select column types. It has been in production for
over 2 months with no bug or unexpected behaviours reported, warranting
a removal of the feature flag from the codebase.


Fixes #37109 

## Automation

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

### 🔍 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/11550654098>
> Commit: d225470d767c441c1b9e07d79e59e5f052339198
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11550654098&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table, @tag.Sanity, @tag.Select`
> Spec:
> <hr>Mon, 28 Oct 2024 09:57:21 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

- **New Features**
- Enhanced the `SelectCell` component for improved label value
determination.
  
- **Bug Fixes**
- Removed unnecessary complexity related to feature flag checks,
resulting in a more reliable display of cell labels.
  
- **Tests**
- Updated test cases for table filtering and sorting functionalities,
removing feature flag dependencies while maintaining core logic.
- Enhanced test coverage for select column functionality, including
dynamic bindings and server-side filtering checks.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-28 18:42:06 +01:00
phennapa-saeliw
2ad374aa52
fix: Change the value of pageOffset when enabling server side pagination (#36056)
## Description
Fixed issue #36022 where incorrect data is displayed when navigating to
the previous page after reaching the last page with fewer items in the
table during server-side pagination enabled by using `props.pageSize`
instead of `props.tableData?.length`.


Fix:

Replaced `props.tableData?.length` with `props.pageSize` to ensure
consistent data display when navigating between pages, especially when
dealing with the last page that has fewer items than the pageSize.


Fixes #36022

## Automation

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




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


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

## Summary by CodeRabbit

- **New Features**
- Improved pagination logic for the table widget, simplifying the
handling of page size.

- **Bug Fixes**
- Resolved potential inconsistencies in pagination when server-side data
is utilized.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Phennapa Saeliw <psaeliw@gmail.com>
2024-10-25 16:17:54 +05:30
Rahul Barwal
554ec58d40
feat: Update TableWidgetV2 to include customIsLoading property (#36857)
## Description
<ins>Problem</ins>
There are many problems with table loader logic, for which many users
try to implement a modal for loader. These problems stem from dependency
and delay on eval, discussed comprehensively in #12308

<ins>Solution</ins>
This PR updates the TableWidgetV2 component to include a new property
called `customIsLoading`. This property controls the loading state of
the widget and is added to the TableWidgetProps interface. Additionally,
the component's state is updated to include the `customIsLoading`
property.

The `contentConfig` file for the TableWidgetV2 is also modified to
include the `customIsLoading` property with its corresponding label,
control type, help text, and validation.

These changes improve the flexibility and customization options of the
TableWidgetV2 component.

Fixes #12308
_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/11456273525>
> Commit: 1c6f4f9caabc3aa45ec3916e5ccb465d946ab0a1
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11456273525&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table`
> Spec:
> <hr>Tue, 22 Oct 2024 09:17:37 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Introduced a new feature flag for custom loading states in the table
widget.
- Added properties for managing custom loading behavior in the
`TableWidgetV2`.
  
- **Bug Fixes**
- Enhanced loading state management to ensure accurate representation
based on new properties.

- **Tests**
- Added unit tests for loading behavior in the `TableWidgetV2`
component, covering default and custom loading scenarios.

- **Documentation**
- Updated help text for properties related to loading states to improve
clarity.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-22 14:51:45 +05:30
Jacques Ikot
d233d7e9c3
feat: Allow filtering of table select column label (#36755)
## Description

**Problem**
When filtering a table with a select column type, users expect to filter
by the visible label values shown in each cell. Currently, however,
filtering is applied to the underlying option values rather than the
displayed labels, leading to unexpected filter results for end-users.

**Root Cause**
In a previous update ([PR
#35124](https://github.com/appsmithorg/appsmith/pull/35124)), the table
cell display for select columns was changed to show labels instead of
values. However, the filtering logic was not updated accordingly, so the
table still filtered on the original option values, creating a mismatch
between displayed and filtered content.

**Solution**
This PR modifies the displayedRow property within the table widget to
use the label property instead of the value key when filtering or
searching select column data. This ensures that table filtering and
searching now align with the visible label values in the select columns,
providing a more intuitive user experience.


Fixes #36635 

## Automation

/ok-to-test tags="@tag.Sanity, @tag.Table, @tag.Select, @tag.Binding"

### 🔍 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/11234735437>
> Commit: fd6c179ffb2c61d23cb98fd749c8df49cebcfcdd
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11234735437&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity, @tag.Table, @tag.Select, @tag.Binding`
> Spec:
> <hr>Tue, 08 Oct 2024 12:48:01 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

- **New Features**
- Introduced a new test case to verify filtering functionality for the
"role" column in the Table Widget.
- Enhanced filtering mechanism to support multiple label values for
select columns.

- **Bug Fixes**
	- Removed outdated search functionality to streamline user experience.

- **Refactor**
	- Restructured existing test cases for improved clarity and flow.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-09 09:09:12 +01:00
Aman Agarwal
56e7f89402
chore: removed old flags for airgap instances (#36609)
## Description
Removed all the occurrences of listed flags in the codebase:

1. ab_ds_binding_enabled
2. ab_ds_schema_enabled
3. ab_gsheet_schema_enabled
4. ab_learnability_discoverability_collapse_all_except_data_enabled
5. ab_learnability_ease_of_initial_use_enabled
6. ab_mock_mongo_schema_enabled
7. ab_start_with_data_default_enabled
8. rollout_js_enabled_one_click_binding_enabled


Fixes #36256
_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/11177173738>
> Commit: bfbf6bbe77b963c5d257c29cf5bac35139417a07
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11177173738&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Fri, 04 Oct 2024 10:31:10 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

## Summary by CodeRabbit

- **New Features**
- Enhanced test coverage for the Community Issues page, focusing on
pagination, search, filtering, and issue management.
- Improved functionality for adding new rows to table widgets, including
visibility controls and state validations.

- **Bug Fixes**
- Resolved issues related to the visibility of UI elements when adding
new rows and ensured accurate data reflection in the table.

- **Tests**
- Expanded tests for pagination, row selection, search functionality,
and filtering logic in table widgets.
- Added comprehensive assertions for client-side search and filtering
scenarios, including checks for modal visibility during issue
management.

- **Chores**
- Removed obsolete feature flags and streamlined logic for managing
feature flags across components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-07 15:26:25 +05:30
Jacques Ikot
6f27959bce
fix: Invalid Date Display in Table Widget's Date Column When Using Unix Timestamp (ms) (#36455)
## Description

**Problem**
When populating a table widget with data that includes dates in Unix
timestamp (milliseconds) format, setting the column type to "Date," the
input format to "Unix timestamp (ms)," and selecting a display format
leads to an issue during inline editing. While the date picker behaves
correctly, selecting a new date results in the table cell showing an
"Invalid Date" error.

**Root Cause**
The platform currently uses DateInputFormat.MILLISECONDS for Unix
timestamp (ms) formatting. However, this value is not a valid option for
the moment.format() function, which expects the input format to be 'x'
for Unix timestamps in milliseconds. This mismatch leads to the "Invalid
Date" error.

**Solution**
Modify the logic to map DateInputFormat.MILLISECONDS to the correct
moment format string 'x'.
Adjust the table's transformDataPureFn to correctly process and display
dates in Unix timestamp (ms) format after inline edits, ensuring the
moment library can handle the input properly.

**Outcome**
This fix ensures that when a user selects a date via the date picker in
inline editing mode, the selected date is displayed correctly in the
table without any errors.


Fixes #35631, #25081

## Automation

/ok-to-test tags="@tag.Sanity, @tag.Binding, @tag.Table,
@tag.Datepicker"

### 🔍 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/11101758400>
> Commit: 6a3cae774f3824bd2ee126b501bfa4b6d71ae0c8
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11101758400&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity, @tag.Binding, @tag.Table, @tag.Datepicker`
> Spec:
> <hr>Mon, 30 Sep 2024 08:54:58 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

## Summary by CodeRabbit

- **New Features**
- Enhanced date column editing in table widgets to accept Unix
timestamps in milliseconds without errors.
	- Introduced a new enumeration for improved date formatting options.
- Added mock data structures for testing various date formats and
transformations in the table widget.
- New method for generating formatted date strings for tomorrow in both
verbose and ISO formats.

- **Bug Fixes**
- Improved validation logic for date inputs in the table, ensuring
proper handling of different date formats.

- **Tests**
- Added new test cases to validate date handling and input formats in
the table widget.
- Introduced a new test suite for transforming table data based on
specified column metadata.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-30 10:02:42 +01:00
Jacques Ikot
8fe96c9c20
fix: isRequired validation property for table select column (#36375)
## Description

**Problem**
The select column of the table widget does not have a validation
property within its property pane to allow users add an isRequired
validation to the table select column.

**Solution**
Added a Validation section to the table select column's property pane,
which includes an isRequired toggle. When enabled, this feature will
trigger a visual indication (error border colour) around the select
widget if a required field is left unselected during "Add new row" or
inline editing.


Fixes #30091 

## Automation

/ok-to-test tags="@tag.Widget, @tag.Table, @tag.Binding, @tag.Sanity,
@tag.Select"

### 🔍 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/10957896180>
> Commit: d2597e6a26938f2b99f2f997fca7bc110e5c2091
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10957896180&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Widget, @tag.Table, @tag.Binding, @tag.Sanity,
@tag.Select`
> Spec:
> <hr>Fri, 20 Sep 2024 12:23:29 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
- Introduced end-to-end tests for Select column validation in Table
widgets.
- Enhanced validation logic to support Select column types in the Table
widget.
- Added visual feedback for required Select fields during row addition
and inline editing.
- Improved locator for single-select widget button control to enhance UI
interaction.

- **Bug Fixes**
- Improved error handling and visual representation for invalid editable
Select cells.

- **Documentation**
- Updated validation configuration to include Select column types for
better usability.

- **Refactor**
	- Enhanced code clarity for styled components related to Select fields.
- Modified method to improve versatility in handling table interactions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Sai Charan <saicharan.chetpelly@zemosolabs.com>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro-2.local>
2024-09-23 08:44:46 +01:00
Rahul Barwal
6507f90e05
fix: Incorrect updation of selctedRowIndex when primary column is set. (#36393)
## Description
<ins> Problem statement </ins>
1. Table should have a primary column set.
2. The table should be filtered(via search or client side filters)
3. there should be a selectedRow in table
a. One way to ensure is add a text widget and bind it to table's
`selectedRowIndex` property.

If you now run a query that updates the data behind the table: the
`selectedRow` is updated to (seemingly) random row and selectedRowIndex
is updated as well

<ins> Rootcause </ins>
We have a mechanism of preserving `selectedRow` when data updates
happen.
Underlying logic gets the previous selected row and tries to find it in
the new data using the primary key.
* If it finds it, it updates the selectedRowIndex to the
`__original_index__` of the found row i.e. its position in the original
data before any filters were applied.

<ins> Solution </ins>
We update the selectedRowIndex to the index in the new filtered data.

<ins> How to test </ins>
1. Create a table with a primary key
2. Add a text widget and bind it to table's `selectedRowIndex` property
3. Filter the table
4. Click on a row to select it
5. Run a query that updates the data behind the table
6. Assert that the selected row is the same and that the
selectedRowIndex is updated to the new index


Fixes #36080
_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, @tag.Binding, @tag.Sanity"

### 🔍 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/10953679202>
> Commit: 1a2d64467e453229940b67b29da1ce9d0e9ac24d
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10953679202&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table, @tag.Binding, @tag.Sanity`
> Spec:
> <hr>Fri, 20 Sep 2024 06:30:08 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

## Summary by CodeRabbit

- **Improvements**
- Enhanced the efficiency of the TableWidgetV2 by streamlining the
method for retrieving the index of selected rows.
- Improved code readability and maintainability without altering the
overall functionality.

- **New Features**
- Introduced new test cases to validate filtering and searching
functionalities within the Table Widget V2.
- Added a JSON configuration for a data-driven table interface,
supporting sorting, filtering, and dynamic data binding.
- Introduced fixture data for testing, allowing for comprehensive
validation of table behavior under various conditions.
- Added a JavaScript object containing employee data to facilitate
filtering and display in the table.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-20 12:25:23 +05:30
Valera Melnikov
c76e6c031c
chore:delete unused files (#36368)
## Description
I used [knip](https://knip.dev/) to identify unused files. There will be
a few more related PRs, after that I will add CI check for this.

Fixes #35778

Related EE PR https://github.com/appsmithorg/appsmith-ee/pull/5165

## Automation

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

### 🔍 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/10940962461>
> Commit: 31749570e9a3f9e4cce250eedba4ec18aace23f9
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10940962461&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Thu, 19 Sep 2024 12:55:41 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
2024-09-19 16:01:03 +03:00
Ilia
d6f249b42d
chore: add blank line eslint rule (#36369)
## Description
Added ESLint rule to force blank lines between statements. 


Fixes #`Issue Number`  
_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  -->
> [!CAUTION]
> 🔴 🔴 🔴 Some tests have failed.
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10924926728>
> Commit: 34f57714a1575ee04e94e03cbcaf95e57a96c86c
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10924926728&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail"
target="_blank">Cypress dashboard</a>.
> Tags: @tag.All
> Spec: 
> The following are new failures, please fix them before merging the PR:
<ol>
> <li>cypress/e2e/Regression/ClientSide/Anvil/AnvilModal_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilButtonWidgetSnapshot_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCheckboxGroupWidgetSnapshot_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCurrencyInputWidgetSnapshot_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilIconButtonWidgetSnapshot_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInlineButtonWidgetSnapshot_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInputWidgetSnapshot_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilParagraphWidgetSnapshot_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilPhoneInputWidgetSnapshot_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilStatsWidgetSnapshot_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchGroupWidgetSnapshot_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchWidgetSnapshot_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilTableWidgetSnapshot_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilToolbarButtonWidgetSnapshot_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts</ol>
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master"
target="_blank">List of identified flaky tests</a>.
> <hr>Wed, 18 Sep 2024 16:33:36 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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

---------

Co-authored-by: Valera Melnikov <valera@appsmith.com>
2024-09-18 19:35:28 +03:00
Jacques Ikot
8a9af791e4
feat: Allow table search to include label and value for tables with select column type (#36061) 2024-09-12 08:28:46 +01:00
Vemparala Surya Vamsi
7cdee526c9
chore: adding telemetry for klona (#35918)
## Description
Klona operations are generally expensive, for that reason we will be
tracking the performance of all klonas in the main thread.

## 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/10608431935>
> Commit: cab2716f74f3747d3df64342f4d7f4972358a3e6
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10608431935&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Thu, 29 Aug 2024 06:26:43 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


## Summary by CodeRabbit

- **New Features**
- Introduced telemetry tracking for cloning operations across various
components, enhancing performance monitoring and debugging capabilities.

- **Bug Fixes**
- Improved observability of cloning operations, aiding in identifying
potential performance bottlenecks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-29 12:35:48 +05:30
Jacques Ikot
28ac53bf6e
fix: Ensure Select Column Displays Data When Options Are Not Set (#35817)
## Description
**Problem**
When using a table widget, changing a column to the "Select" type causes
the data in that column to disappear unless the options property is
explicitly set. This creates a poor user experience, as it appears that
the data has been lost or the widget is malfunctioning.

**Solution**
We have implemented a fallback mechanism to ensure a smoother user
experience. If no options are set in the property pane, the label inside
the select cell will now default to displaying the existing value. This
ensures that the data remains visible, even in the absence of predefined
options.


Fixes #35807

## Automation

/ok-to-test tags="@tag.Widget, @tag.Select, @tag.Binding, @tag.Table,
@tag.Sanity"

### 🔍 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/10513374411>
> Commit: 1e89468e8345f2fc351c100428dca76a7a455dbc
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10513374411&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Widget, @tag.Select, @tag.Binding, @tag.Table,
@tag.Sanity`
> Spec:
> <hr>Thu, 22 Aug 2024 19:43:53 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


- **New Features**
- Enhanced the select column in the table widget to return a default
value when no options are available.

- **Bug Fixes**
- Improved robustness of the select cell component to prevent errors
when the options array is empty.

- **Tests**
- Updated and reorganized test cases for the select column to improve
clarity and specificity.
- Introduced a new test case to validate default value behavior when no
options are provided.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-23 10:10:27 +01:00
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
Jacques Ikot
6628635cf4
fix: mandatory date column enforcement (#35613)
## Description
**Problem:**
When the `isRequired` property is set for date columns in the table
widget, the validation doesn't work as expected. Users can add new rows
without filling in the date field, even though it is marked as required.
This results in rows being added with missing date values, which can
lead to incomplete or invalid data entries.

**Root Cause:**
The validation logic for the date column is currently handled within the
DateCell component. However, the isRequired validation functionality was
not implemented within this component. Additionally, the general
validation logic in the `getEditableCellValidity` function, located in
the derived.js file, does not account date cells in its isRequired
validation.

**Solution:**
To fix this issue:

**Enhance the `getEditableCellValidity` function:** Extend the existing
validation logic in getEditableCellValidity to include the date cell in
its validation, specifically checking for the isRequired property.

**Integrate with DateCell validation:** Ensure that the isRequired
validation is properly executed in conjunction with the existing date
validations inside the DateCell component. This will enforce the
requirement and prevent new rows from being added if the date field is
left empty.

**Test Plan**

https://www.notion.so/appsmith/Test-Plan-Date-Column-Marked-as-Required-Doesn-t-Enforce-Mandatory-Entry-When-Adding-New-Table-Row-c73b764af60842a188cba056bdda6d79?pvs=4

Fixes #34258

## 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/10453174231>
> Commit: 40fe2eaf7d45024bef00f8031e971a5bac2a4e3e
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10453174231&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Mon, 19 Aug 2024 13:17:23 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


## Summary by CodeRabbit

- **New Features**
- Introduced validation for "Date" column types, ensuring that required
fields are correctly enforced.

- **Enhancements**
- Improved validation logic for more accurate user feedback in date
cells.
  - Expanded support for validating "date" columns in the table widget.

- **Bug Fixes**
- Enhanced error handling to ensure proper indication of cell validity
based on new validation criteria.
  - Updated visual feedback for cell editor state in the UI.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-20 07:09:51 +01:00
Aman Agarwal
f0059fe894
fix: table save row button onclick function (#35412) 2024-08-08 18:46:40 +05:30
Valera Melnikov
b7ec5dacd8
chore: rename old ADS package (#35517)
## Description
Rename package `design-system-old` to `@appsmith/ads-old`.

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]
> 🔴 🔴 🔴 Some tests have failed.
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10286195096>
> Commit: c0d478694b12f35b88687b6dae6f252967fba540
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10286195096&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail"
target="_blank">Cypress dashboard</a>.
> Tags: @tag.All
> Spec: 
> The following are new failures, please fix them before merging the PR:
<ol>
>
<li>cypress/e2e/Regression/ClientSide/BugTests/DatasourceSchema_spec.ts</ol>
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master"
target="_blank">List of identified flaky tests</a>.
> <hr>Wed, 07 Aug 2024 15:26:02 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
2024-08-08 15:55:00 +03:00
Valera Melnikov
c42e0317de
fix: change appsmith alias (#35349)
In order to unify package names, we decided to use `@appsmith` prefix as
a marker to indicate that packages belong to our codebase and that these
packages are developed internally. So that we can use this prefix, we
need to rename the alias of the same name. But since `@appsmith` is
currently being used as an alias for `ee` folder, we have to rename the
alias as the first step.

Related discussion
https://theappsmith.slack.com/archives/CPG2ZTXEY/p1722516279126329

EE PR — https://github.com/appsmithorg/appsmith-ee/pull/4801

## 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/10267368821>
> Commit: 2b00af2d257e4d4304db0a80072afef7513de6be
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10267368821&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Tue, 06 Aug 2024 14:24:22 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
2024-08-06 17:52:22 +03:00
Jacques Ikot
3b1c14a9f0
feat: add sortBy property to table select cell type (#35187)
## Description
**Problem**
The table widget now supports the Select column type, which allows the
column to contain both a label and a value. This could be useful for
currency fields, foreign keys, or any other case where you want to
display a different version of the column value. However, there is a
problem with sorting. The table always sorts using the value, and does
not give the user an option to sort using the label, where it makes
sense in specific cases.

**Solution**
This PR adds a Sort By property to the table select cell, allowing the
users to choose which value is used for sorting without affecting any
functionality of the label or value of the select cell.

[Additional Technical
Documentation](https://www.notion.so/appsmith/Adding-sortBy-Property-to-Select-Columns-in-Table-Widget-V2-a5a41e6319a047378eb50a42be8c32ef?pvs=4)

**Tested Cases**
1. Sort select column by default value
Objective: Ensure that a newly added table with select column default
sorts by the value
**Steps:**
- Drop a new table widget.
- Add sample data to the table.
- Set a column (e.g., role) to select type.
- Add selectOptions property
- Verify that when sorted in ascending or descending order, the sorting
is correct

2. Sort select column by label
Objective: Ensure that a newly added table with select column and sortBy
property set to label sorts correctly
**Steps:**
- Drop a new table widget.
- Add sample data to the table.
- Set a column (e.g., role) to select type
- Add selectOptions property
- Set sortBy property to label
- Verify that when sorted in ascending or descending order, the sorting
is correct and based on the label value only

3. Verify that sorting of other table cells that are not select works as
expected
Objective: Ensure that every other cell type in the table sorts
correctly
**Steps:**
- Drop a new table widget.
- Add sample data to the table.
- Set a column (e.g., role) to select type
- Add selectOptions property
- Set sortBy property to label
- Verify that when columns other that role are sorted, they are sorted
correctly

4. Verify that sorting works as expected when table data is a binding
Objective: Ensure that the sorting works for all columns while using
data binding in table data
**Steps:**
- Drop a new table widget
- Link a query binding to the table data property
- Verify that all columns sort correctly

5. Verify that sorting works as expected when table data is a binding
and select column sorting is set to label
Objective: Ensure that the sorting works for all columns while using
data binding in table data with a select column set to sort by the label
**Steps:**
- Drop a new table widget
- Link a query binding to the table data property
- Set a column (e.g., role) to select type
- Add selectOptions property
- Set sortBy property to label
- Verify that all columns sort correctly

6. Verify that sortBy logic does not take effect or break user
experience until the user adds selectOptions in select cell
**Steps:**
- Drop a new table widget
- Link a query binding to the table data property or add raw data
- Set a column (e.g., role) to select type
- Do not add selectOptions
- Set sortBy property to label
- Verify that all other columns display and sort correctly

7. Verify that sorting by label and value works correctly in deployed
mode
**Steps:**
- Drop a new table widget
- Link a query binding to the table data property or add raw data
- Set a column (e.g., role) to select type
- Add selectOptions
- Set sortBy property to label
- Deploy application
- Confirm that sorting works correctly for all columns

Fixes #21993 

## Automation

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

### 🔍 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/10165119164>
> Commit: 8a4e8b238adc0d78726a811b54a209caa4990606
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10165119164&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table, @tag.Binding, @tag.Sanity`
> Spec:
> <hr>Tue, 30 Jul 2024 16:02:35 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


- **New Features**
	- Introduced a feature flag for dynamic table cell labeling.
- Added a sorting option for select cells, allowing sort by value or
label.
- Enhanced user interface with new configuration options for select
components.
	- Improved sorting functionality for select columns to sort by labels.

- **Bug Fixes**
- Improved sorting functionality in the table widget to ensure accurate
data representation.

- **Tests**
- Expanded and clarified test cases for sorting functionality in the
Table Widget V2.
- Updated testing structure for better reliability and isolation of test
scenarios.
	- Integrated dynamic testing capabilities based on feature flags.

- **Documentation**
- Added new locators for sorting controls to enhance UI interaction
capabilities.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-02 08:37:00 +01:00
Valera Melnikov
a2bfe450b6
chore: enable no-explicit-any rule (#35321)
## Description
-  Enabled the rule `@typescript-eslint/no-explicit-any`
- Suppressed errors with comment
```
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
```

Fixes #35308 

## 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/10181176984>
> Commit: 7fc604e24fa234da7ab2ff56e0b1c715268796ee
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10181176984&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Wed, 31 Jul 2024 15:00:45 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
2024-07-31 18:41:28 +03:00
Jacques Ikot
2cded02983
feat: display label in table select cell (#35124)
## Description
**Issue**
In the table widget, the select column currently displays the value from
the dropdown when a user makes a selection, rather than the label. This
behaviour is inconsistent with the standalone select widget, which
correctly renders the label upon selection.

**Fix**
This PR addresses the inconsistency by modifying the table widget's
select column to display the label of the selected item, while
maintaining the table cell value and ensuring alignment with the
behaviour of the standalone select widget.

**Tested Cases**
Manual Test Cases for Table Select Widget Improvement

1. Default Value Display
**Objective:** Ensure that a new table displays the correct default
label key from the selectOptions in the cell.
**Steps:**
- Drop a new table widget.
- Add sample data to the table.
- Set a column (e.g., gender) to select type.
- Verify that the table cell displays the value from the label key of
the `selectOptions` by default.

2. Binding Check for Selected Row
**Objective:** Ensure that the table binding for the selected row
reflects the correct value key from the selectOptions.
**Steps:**
- Drop a new table widget.
- Add sample data to the table.
- Set a column (e.g., gender) to select type.
- Select a row and verify that `Table1.selectedRow.gender` matches the
value key from the `selectOptions`.

3. Updating Table Cell Content
**Objective:** Verify that updating the table cell content via the
dropdown updates the cell with the correct label key property.
**Steps:**
- Drop a new table widget.
- Add sample data to the table.
- Set a column (e.g., gender) to select type.
- Change the content of the table cell using the dropdown.
- Confirm that the cell content updates accordingly with the value key
property.

4. Add New Row Functionality
**Objective:** Ensure that adding a new row works as expected with the
enhanced functionality.
**Steps:**
- Drop a new table widget.
- Add sample data to the table.
- Set a column (e.g., gender) to select type.
- Add a new row to the table.
- Verify that the new row uses the label key property from the
`selectOptions` in the table display.

5. Deployed Mode Verification
**Objective:** Verify that the display functionality works correctly in
deployed mode.
**Steps:**
- Drop a new table widget.
- Add sample data to the table.
- Set a column (e.g., gender) to select type.
- Change the displayAs property to both value and label.
- Deploy the table.
- Verify that the table displays correctly in both value and label modes
in the deployed environment.


Fixes #26188

## Automation

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

### 🔍 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/10080592979>
> Commit: 78b268d2b566aa07ef23fec567ce05e8c5a6add4
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10080592979&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table, @tag.Binding, @tag.Sanity`
> Spec:
> <hr>Wed, 24 Jul 2024 17:17:06 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

- **New Features**
- Improved display of selected options in table widgets by showing the
corresponding label instead of the raw value.
- Introduced a feature flag to toggle the table cell label value
functionality.

- **Bug Fixes**
- Enhanced test cases to ensure accurate validation of select options
behavior within the table widget.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-25 12:39:24 +01:00
Jacques Ikot
34f6e32d6d
revert: change value to label in onItemSelect inside SelectCell of table widget (#34872)
Reverts appsmithorg/appsmith#34743

## 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/9888593641>
> Commit: eec317589c3e8ec7fa68a85811f0fb4e7e632582
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9888593641&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table`
> Spec:
> <hr>Thu, 11 Jul 2024 09:38:04 UTC
<!-- end of auto-generated comment: Cypress test results  -->

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

## Summary by CodeRabbit

- **Refactor**
- Improved test cases for select options in the table widget for better
clarity and organization.
- Updated `SelectCell` component to use option values instead of labels
for item selection.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-11 15:08:53 +05:30
Jacques Ikot
b7853a99b2
feat: change value to label in onItemSelect inside SelectCell of table widget (#34743)
## Description
**Issue**
In the table widget, the select column currently displays the value from
the dropdown when a user makes a selection, rather than the label. This
behaviour is inconsistent with the standalone select widget, which
correctly renders the label upon selection.

**Fix**
This PR addresses the inconsistency by modifying the table widget's
select column to display the label of the selected item, ensuring
alignment with the behaviour of the standalone select widget.


Fixes #26188

## Automation

/ok-to-test tags="@tag.Table, @tag.Binding, @tag.Widget, @tag.Sanity"

### 🔍 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/9843945454>
> Commit: 330d0d3f82ea7a8769c350f7caa0714959838f12
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9843945454&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table, @tag.Binding, @tag.Widget, @tag.Sanity`
> Spec:
> <hr>Mon, 08 Jul 2024 18:21:02 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **Bug Fixes**
- Updated the `SelectCell` component to use the `option.label` instead
of `option.value` for item selection.
  
- **Tests**
- Revised test descriptions and assertions for select options in Table
Widget to reflect the new functionality of using labels as values in
select cells.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-09 09:00:00 +01:00
carinanfonseca
a2f2f795c8
chore: Turn off Allow filtering property on Table widget (#34593)
https://github.com/appsmithorg/appsmith/issues/34591

## Description
Making _Allow filtering_ option false by default.

<img width="798" alt="Allow filtering off"
src="https://github.com/appsmithorg/appsmith/assets/121817440/8ac64773-2385-433d-96fa-0a90080e2462">


Fixes #34591
_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, @tag.Widget, @tag.Binding, @tag.Sanity"

### 🔍 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/9795462304>
> Commit: e0c1e8376b702f13b9640c880cf5606af070a420
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9795462304&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table, @tag.Widget, @tag.Binding, @tag.Sanity`
<!-- end of auto-generated comment: Cypress test results  -->




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


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

- **Bug Fixes**
  - Filtering is now disabled by default for the `TableWidgetV2`.

- **Tests**
- Updated test scripts to enable filtering for `TableWidgetV2` in
multiple scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Jacques Ikot <jacquesikot@gmail.com>
2024-07-05 08:46:11 +01:00