appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

fix: filteredTableData property in autocomplete suggestions

Open Pavan134 opened this issue 1 year ago • 5 comments

  • Fix the filteredTableData property in autocomplete suggestions
  • Snapshot:
  • Issue:

image

image

  • After fix:

image

image

  • Cypress test execution:

    image

Description

  • Added filteredTableData property in autocomplete suggestions of table widget.
  • Added cypress test for filteredTableData property to verify it is present or not in autocomplete suggestions

Summary by CodeRabbit

  • New Features

    • Introduced filteredTableData property to enhance data handling in the Table Widget.
    • Added end-to-end tests to verify the functionality of autocomplete suggestions based on filtered data in the table widget.
  • Bug Fixes

    • Improved reliability of autocomplete suggestions when filtering options are applied in the Table Widget.
  • Tests

    • Implemented unit tests for the filteredTableData property to ensure correct behavior within autocomplete definitions.

Pavan134 avatar Aug 23 '24 06:08 Pavan134

Walkthrough

The changes introduce a new filteredTableData property to the TableWidgetV2 class, enhancing its functionality related to filtered data handling. Additionally, Cypress end-to-end and unit tests are added to verify the correct operation of the filteredTableData property within the autocomplete suggestions of the table widget. This ensures that the filtering feature behaves as expected when applied to the table data.

Changes

Files Change Summary
app/client/cypress/e2e/Regression/ClientSide/... Introduces a Cypress test for verifying the filteredTableData property in autocomplete suggestions of a table widget with specific data and filtering options.
app/client/src/widgets/TableWidgetV2/widget/... Adds a new property filteredTableData to the TableWidgetV2 class, derived from the widget's state, enhancing data handling related to filtering.
app/client/src/widgets/TableWidgetV2/checkFilteredDataProperty.test.ts Implements unit tests for the TableWidgetV2, focusing on the filteredTableData property within its autocomplete definitions to ensure correct integration and functionality.

Possibly related PRs

  • #36061: This PR enhances the test specifications for the TableV2 component, which is directly related to the filtering functionality being tested in the main PR's new test file for the filteredTableData property.
  • #36303: This PR modifies the test specification for a table component, which aligns with the main PR's focus on testing the filteredTableData property in the table widget.
  • #36375: This PR introduces a validation property for the select column in the table widget, which is relevant to the main PR's focus on the filteredTableData property and its behavior in the context of filtering.
  • #36393: This PR fixes an issue with the selectedRowIndex in the TableWidgetV2, which is closely related to the filtering and selection functionality being tested in the main PR.

Suggested labels

Bug, Enhancement, Widgets Product, Table Widget, ok-to-test, Widgets & Accelerators Pod, Test

Suggested reviewers

  • ApekshaBhosale
  • rahulbarwal
  • sagar-qa007
  • jacquesikot

Poem

In the realm of widgets, a change takes flight,
Filtering data, making suggestions bright.
With Cypress in tow, we test with glee,
Autocomplete magic for all to see!
A new property born, refined to the core,
Enhancing our tables, who could ask for more? ✨


Recent review details

Configuration used: .coderabbit.yaml Review profile: CHILL

Commits

Files that changed from the base of the PR and between 459c912cac9cc05e710661014e33762482ac1df8 and edecbf0e32046acf581c83dd13e707b308ad5133.

Files selected for processing (1)
  • app/client/src/widgets/TableWidgetV2/widget/checkFilteredDataProperty.test.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/client/src/widgets/TableWidgetV2/widget/checkFilteredDataProperty.test.ts

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example: -- I pushed a fix in commit <commit_id>, please review it. -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples: -- @coderabbitai generate unit testing code for this file. -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase. -- @coderabbitai read src/utils.ts and generate unit testing code. -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format. -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Aug 23 '24 06:08 coderabbitai[bot]

@Pavan134 Can you please explain the requirement for cypress test case here? Also please add equivalent unit test cases.

sagar-qa007 avatar Aug 24 '24 08:08 sagar-qa007

Hi @sagar-qa007 Gentle Remainder: Thanks for reviewing.I have added unit test cases. Can you please review it? Thanks in Advance.

Pavan134 avatar Aug 28 '24 05:08 Pavan134

@rahulbarwal Please check this PR. Let's plan this as shadow PR.

sagar-qa007 avatar Aug 28 '24 05:08 sagar-qa007

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

github-actions[bot] avatar Sep 10 '24 16:09 github-actions[bot]

Hii @sagar-qa007 I created cypress test file for checking the 'filteredTableData' property is present in auto complete section.If the cypress file is not required can I delete the file.

Pavan134 avatar Sep 11 '24 06:09 Pavan134

@Pavan134 what is the issue number that this PR is fixing. I don't see any linked issue.

rahulbarwal avatar Sep 11 '24 08:09 rahulbarwal

@rahulbarwal This is the issue link

Pavan134 avatar Sep 11 '24 09:09 Pavan134

@Pavan134 a spec is failing due to new changes in the PR. It needs to be updated. CI Run: https://github.com/appsmithorg/appsmith/actions/runs/10881528449/job/30191358368 Spec Name: cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Copy_Paste_spec.js

Please fix it and let me know if you have any questions.

rahulbarwal avatar Sep 16 '24 13:09 rahulbarwal

@rahulbarwal If everything is ok can you review and merge this pr

Pavan134 avatar Oct 03 '24 06:10 Pavan134

@Pavan134 we are revisiting the validity of this issue here: https://github.com/appsmithorg/appsmith/issues/26097#issuecomment-2370227356

We might not need this fix at all. We appreciate your effort and will keep you updated.

rahulbarwal avatar Oct 03 '24 11:10 rahulbarwal

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

github-actions[bot] avatar Jan 12 '25 16:01 github-actions[bot]

This PR has been closed because of inactivity.

github-actions[bot] avatar Feb 02 '25 16:02 github-actions[bot]